Is it possible to run two separate loader circuits for the same extension?
In my case, I want to run one set of bootloaders to create a static file, and another to write another set of files (for server-side rendering)
{ test: /\.p?css$/, use: ExtractTextPlugin.extract([ "css-loader", "postcss-loader" ]), }, { test: /\.p?css$/, use: [ { loader: "emit-file-loader", options: { name: "dist/[path][name].pcss", }, }, { loader: "skeleton-loader", options: { procedure: function (content) { return `module.exports = ${content}` }, }, }, "postcss-loader", ]), }
But according to What is the bootloader order for webpack? all bootloaders seem to run in the same chain, even if they are defined in separate rules.
I may not completely understand the bootloaders, but is there a way for each set of bootloaders (the use list) to run independently?
webpack webpack-2
Craig kochis
source share