You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolves the given request to a module, applies all configured loaders and calls back with the generated source, the sourceMap and the module instance (usually an instance of [`NormalModule`](https://github.com/webpack/webpack/blob/master/lib/NormalModule.js)). Use this function if you need to know the source code of another module to generate the result.
392
392
393
-
`this.loadModule` in a loader context uses CommonJS resolve rules by default. Use `this.getResolve` with an appropriate `dependencyType`, e.g. `'esm'`, `'commonjs'` or a custom one before using a different semantic.
393
+
`this.loadModule` in a loader context uses CommonJS resolve rules by default. Use `this.getResolve` with an appropriate `dependencyType`, e.g. `'esm'`, `'commonjs'` or a custom one before using a different semantic.
Copy file name to clipboardExpand all lines: src/content/blog/2020-10-10-webpack-5-release.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -168,7 +168,7 @@ __MIGRATION__: Use the default export.
168
168
169
169
Even when using the default export, unused properties are dropped by the `optimization.usedExports` optimization and properties are mangled by the `optimization.mangleExports` optimization.
170
170
171
-
It's possible to specify a custom JSON parser in `Rule.parser.parse` to import JSON-like files (e.g. for toml, yaml, json5, etc.).
171
+
It's possible to specify a custom JSON parser in `Rule.parser.parse` to import JSON-like files (e.g. for toml, yaml, json5, etc.).
172
172
173
173
### import.meta
174
174
@@ -475,7 +475,7 @@ The `target` option now influences more things about the generated code than bef
475
475
- Some loaders might change behavior based on that
476
476
477
477
For some of these things the choice between `"web"` and `"node"` is too rough and we need more information.
478
-
Therefore we allow to specify the minimum version e.g. like `"node10.13"` and infer more properties about the target environment.
478
+
Therefore we allow to specify the minimum version e.g. like `"node10.13"` and infer more properties about the target environment.
479
479
480
480
It's now also allowed to combined multiple targets with an array and webpack will determine the minimum properties of all targets. Using an array is also useful when using targets that doesn't give full information like `"web"` or `"node"` (without version number). E. g. `["web", "es2020"]` combines these two partial targets.
481
481
@@ -735,7 +735,7 @@ __MIGRATION__: Upgrade to the latest Node.js version available.
735
735
-`stats.chunkRelations` added: Show parent/children/sibling chunks
736
736
-`stats.errorStack` added: Show webpack-internal stack trace of errors
737
737
-`stats.preset` added: select a preset
738
-
-`stats.relatedAssets` added: show assets that are related to other assets (e.g. SourceMaps)
738
+
-`stats.relatedAssets` added: show assets that are related to other assets (e.g. SourceMaps)
739
739
-`stats.warningsFilter` deprecated in favor of `ignoreWarnings`
740
740
-`BannerPlugin.banner` signature changed
741
741
-`data.basename` removed
@@ -803,7 +803,7 @@ __MIGRATION__: This can be implemented in the loader itself
803
803
804
804
`getResolve(options)` in the loader API will merge options in a different way, see `module.rules``resolve`.
805
805
806
-
As webpack 5 differs between different issuing dependencies so it might make sense to pass a `dependencyType` as option (e.g. `"esm"`, `"commonjs"`, or others).
806
+
As webpack 5 differs between different issuing dependencies so it might make sense to pass a `dependencyType` as option (e.g. `"esm"`, `"commonjs"`, or others).
Copy file name to clipboardExpand all lines: src/content/guides/code-splitting.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,7 @@ The [`dependOn` option](/configuration/entry-context/#dependencies) allows to sh
147
147
148
148
Using multiple entry points per page should be avoided when possible in favor of an entry point with multiple imports: `entry: { page: ['./analytics', './app'] }`. This results in a better optimization and consistent execution order when using `async` script tags.
149
149
150
-
T> Multiple entry points per page could be used in scenarios where HTML is generated in a dynamic matter, e.g. when components on page are unknown at compile-time and HTML page is composed dynamically depending on the data.
150
+
T> Multiple entry points per page could be used in scenarios where HTML is generated in a dynamic matter, e.g. when components on page are unknown at compile-time and HTML page is composed dynamically depending on the data.
Copy file name to clipboardExpand all lines: src/content/migrate/5.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ Need to support an older browser?
129
129
130
130
- By default, webpack will use your browserslist config to decide which code style to emit.
131
131
- Without a browserslist it would emit ES6 style. You can use `target: ["web", "es5"]` to change it to ES5.
132
-
- For Node.js, builds include the supported Node.js version in the `target` option and webpack will automatically figure out which syntax is supported, e.g. `target: 'node8.6'`.
132
+
- For Node.js, builds include the supported Node.js version in the `target` option and webpack will automatically figure out which syntax is supported, e.g. `target: 'node8.6'`.
0 commit comments