Right now there's no easy way to override the rulesets for a given pattern, ex:
rules = [
{
test: /\.js$/,
loader: 'some-loader'
}
]
Overriding the default rules for the pattern matching JS files would require copying over significant chunks of the default webpack-widget config into the webpack config for an individual widget. Instead, we can create default definitions for individual rules, allowing them to be more easily overridden by widgets based on their needs, like so:
module: {
rules: [
rules.loaderDoNothingToJs,
rules.loaderCompileCoffee,
]
},
Right now there's no easy way to override the rulesets for a given pattern, ex:
Overriding the default rules for the pattern matching JS files would require copying over significant chunks of the default webpack-widget config into the webpack config for an individual widget. Instead, we can create default definitions for individual rules, allowing them to be more easily overridden by widgets based on their needs, like so: