Skip to content

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

@clpetersonucf

Description

@clpetersonucf

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,
	]
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions