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

The ---module-bind-pre command-line argument leads to "configuration.module has an unknown property 'preLoaders'" error #4917

Closed
georgir opened this issue May 23, 2017 · 3 comments · Fixed by #5346

Comments

@georgir
Copy link

georgir commented May 23, 2017

The command-line argument --module-bind-pre generates an invalid configuration using the "preLoaders" key instead of "loaders" with "enforce":"pre".
[edit: and while at it, might as well change "loaders" to "rules"]

Likewise for post.

Tested on webpack 2.5.1, but from the code it seems to be the same in current version 2.6.0 as well.

@sokra
Copy link
Member

sokra commented May 24, 2017

Yep, that's wrong. Send a PR changing this to module.rules with ènforce: "pre"`

@georgir
Copy link
Author

georgir commented May 26, 2017

Sorry but I'm a bit stumped by the needed testcases for a PR

@sokra
Copy link
Member

sokra commented May 30, 2017

Take a look at the test/binCases folder for testcases for the CLI. You'll need a test.opts file with your arguments.

esbenp added a commit to esbenp/webpack that referenced this issue Jul 23, 2017
will also add enfore:pre/post to the rule configuration

closes webpack#4917
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants