Skip to content

Instantly share code, notes, and snippets.

@TheLarkInn
Created September 26, 2016 15:42
Show Gist options
  • Save TheLarkInn/d7b08dd0b7a177508b3068c7f2f0212a to your computer and use it in GitHub Desktop.
Save TheLarkInn/d7b08dd0b7a177508b3068c7f2f0212a to your computer and use it in GitHub Desktop.
Example of mixing query params between multiple loaders (which wasn't possible at one time) with webpack 2.
module.exports = config;
const config = {
module: {
rules: [ //<=== 'loaders' works as a fallback but for .23+ best to start using "rules" instead.
{
test: /\.less/,
loaders: [
"style-loader",
{loader: "css-loader", query: {}},
{loader: "less-loader", query: {}}
]
}
],
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment