Skip to content

docs(config) add comments and values for rule.type #2541

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

Merged
merged 3 commits into from
Sep 27, 2018
Merged

docs(config) add comments and values for rule.type #2541

merged 3 commits into from
Sep 27, 2018

Conversation

nerdkid93
Copy link
Contributor

Added documentation and an example around a Module's Rule.type configuration property. Fixes #1994


Possible values: `"javascript/auto" | "javascript/dynamic" | "javascript/esm" | "json" | "webassembly/experimental"`

`Rule.type` sets the type for a matching module. This prevents defaultRules and their default importing behaviors from occuring. For example, if you want to load a `.json` file through a custom loader, you'd need to set the `type` to `javascript/auto` to bypass webpack's built-in json importing. (See [v4.0 changelog](https://github.com/webpack/webpack/releases/tag/v4.0.0) for more details)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo "ocurring"

Copy link
Member

@montogeek montogeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comment

@montogeek montogeek merged commit 9d26426 into webpack:master Sep 27, 2018
@montogeek
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants