-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Confusing Parser Options #1484
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
Comments
jennings
added a commit
to jennings/webpack.js.org
that referenced
this issue
Aug 6, 2017
dear-lizhihua
referenced
this issue
in docschina/webpack.js.org
Aug 10, 2017
* docs(config): change `global` to `root` in externals (#1214) The currently deployed documentation indicates that there are 4 module contexts you can specify under the externals config... - `global` - `commonjs` - `commonjs2` - `amd` ... which contradicts both the examples that surround it, and the actual library functionality. This just changes the word "global" to "root" in the section that lists the module contexts. * docs(config): clarify that HMR plugin can be added via a flag (#1478) * fix(markdown): resolve some odd code display bugs (#1486) Fix list formatting in `/development/plugin-patterns/`. Remove the `inline-block` declaration to let inline code flow more naturally and prevent this odd wrapping if other badly formatted lists slip in. * docs(guides): add note about chunkFilename (#1483) * docs(config): clarify the meaning of `Rule.parser` options (#1489) Fixes #1484 * docs(config): improve node documentation (#1368) The documentation about using built-in Node.js modules was very poor (i.e. non-existent). This expands the documentation of the "node" configuration option, and shows how one can require built-in modules if desired. Furthermore, all possible effects of the options are explicitly documented. Instead of being vague of what happens when `false` is used, it is explicitly spelled out what happens. References: - https://github.com/webpack/webpack/blob/a589a6c9789a9d342fc630e36ab81827dd20289b/lib/WebpackOptionsApply.js shows when the NodeStuffPlugin and NodeSourcePlugin plugins are used. - https://github.com/webpack/webpack/blob/a589a6c9789a9d342fc630e36ab81827dd20289b/lib/NodeStuffPlugin.js is the plugin that is used for every target. - https://github.com/webpack/webpack/blob/a589a6c9789a9d342fc630e36ab81827dd20289b/lib/node/NodeSourcePlugin.js is the plugin that is only used for "web" and "webworker" targets. - https://github.com/webpack/webpack/blob/a589a6c9789a9d342fc630e36ab81827dd20289b/lib/MultiModule.js#L65-L67 is the generated "webpackMissingModule" code for unresolved modules. (when the NodeSourcePlugin is not used, the environment's "require" is used. In Node.js, this also throws a "Cannot find module 'modulename'" error (with single quotes instead of double quotes)). * docs(config): correct substitutions in output.md (#1487) Correct `output.filename` substitutions and move the others to `output.sourceMapFilename`. Also fix `related` link in the context- replacement-plugin. Fixes #1467
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
feature
What is the current behavior?
Description is confusing
If the current behavior is a bug, please provide the steps to reproduce.
Go to https://webpack.js.org/configuration/module/#rule-parser,
see confusing description of enable/disable parser options
What is the expected behavior?
It would be great to clear up the documentation of the parser options. Right now, I'm really confused if passing
true
would nowdisable
orenable
the parsers?!If this is a feature request, what is motivation or use case for changing the behavior?
I'm so confused.
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
irrelevant
This issue was moved from webpack/webpack#5439 by @sokra. Orginal issue was by @mrtnbroder.
The text was updated successfully, but these errors were encountered: