Closed eduarddotgg closed 8 years ago
This isn't really an issue with postcss-css-variables
, just how the require cache isn't updated while an app is running.
You can register a new middleware before your postcss-middleware
that will run delete require.cache[require.resolve(cssVariables)];
.
app.use(function(req, res, next) {
delete require.cache[require.resolve(cssVariables)];
next();
});
I'm using postcss express middleware and i would like to use variables from external file. Something like this:
it works just fine but one tiny problem if i modify something in cssvariables.js i will need to restart server to see changes.
There was same issue with postcss-simple-vars and work around was this:
So it would be great to see changes without server restart.