I need to execute one JavaScript function before the Webpack starts its building process. The function just takes .scss
files and concatenate them into one.
After that Webpack should take the result file. Is there an option to do that?
At the moment I run the function before the module.exports
in webpack.config.js
, but it seems that its not synchronous operation. Module.exports execute before the concat()
function ends and Webpack can't find .scss file.
function concat(opts) {
(...)
}
concat({ src : styles, dest : './css/style.scss' });
module.exports = [
(...)
]