Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to override default module rules in webpack-widget config #8

Open
clpetersonucf opened this issue Sep 13, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@clpetersonucf
Copy link
Member

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,
	]
},
@clpetersonucf clpetersonucf added the enhancement New feature or request label Sep 13, 2018
@clpetersonucf
Copy link
Member Author

This same update ought to be applied to the plugins section as well. The same formatting is used to clean, copy, and zip the contents of the build directory, but making changes to any of the steps requires them to be re-appended to the end of the plugins array, which is sloppy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant