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
Copy file name to clipboardExpand all lines: src/content/blog/2020-10-10-webpack-5-release.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -587,7 +587,7 @@ This is true in general, but might not be always true during webpack or plugin d
587
587
588
588
Targets that only allow to startup a single file (like node, WebWorker, electron main) now supports loading the dependent pieces required for bootstrapping automatically by the runtime.
589
589
590
-
This allows using `opimization.splitChunks` for these targets with `chunks: "all"` and also `optimization.runtimeChunk`
590
+
This allows using `optimization.splitChunks` for these targets with `chunks: "all"` and also `optimization.runtimeChunk`
591
591
592
592
Note that with targets where chunk loading is async, this makes initial evaluation async too. This can be an issue when using `output.library`, since the exported value is a Promise now.
593
593
@@ -1293,7 +1293,7 @@ These dependencies are cheaper to process and webpack uses them when possible
1293
1293
-`Compilation.addModuleDependencies` removed
1294
1294
-`Compilation.prefetch` removed
1295
1295
-`Compilation.hooks.beforeHash` is now called after the hashes of modules are created
1296
-
-**MIGRATION**: Use `Compiliation.hooks.beforeModuleHash` instead
1296
+
-**MIGRATION**: Use `Compilation.hooks.beforeModuleHash` instead
1297
1297
-`Compilation.applyModuleIds` removed
1298
1298
-`Compilation.applyChunkIds` removed
1299
1299
-`Compiler.root` added, which points to the root compiler
@@ -1392,7 +1392,7 @@ These dependencies are cheaper to process and webpack uses them when possible
1392
1392
-`ExternalModule.external` removed
1393
1393
-`HarmonyInitDependency` removed
1394
1394
-`Dependency.getInitFragments` deprecated
1395
-
-**MIGRATION**: Use `apply``initFragements` instead
1395
+
-**MIGRATION**: Use `apply``initFragments` instead
1396
1396
- DependencyReference now takes a function to a module instead of a Module
Copy file name to clipboardExpand all lines: src/content/configuration/devtool.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ T> Instead of using the `devtool` option you can also use `SourceMapDevToolPlugi
74
74
|`hidden-*` addition | no reference to the SourceMap added. When SourceMap is not deployed, but should still be generated, e. g. for error reporting purposes. |
75
75
|`nosources-*` addition | source code is not included in SourceMap. This can be useful when the original files should be referenced (further config options needed). |
76
76
77
-
T> We expect a certain pattern when validate devtool name, pay attention and dont mix up the sequence of devtool string. The pattern is: `[inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map`.
77
+
T> We expect a certain pattern when validate devtool name, pay attention and don't mix up the sequence of devtool string. The pattern is: `[inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map`.
78
78
79
79
Some of these values are suited for development and some for production. For development you typically want fast Source Maps at the cost of bundle size, but for production you want separate Source Maps that are accurate and support minimizing.
If we specify `output.library.name` with `type: commmonjs2`, the return value of your entry point will be assigned to the `module.exports.[output.library.name]`.
1291
+
If we specify `output.library.name` with `type: commonjs2`, the return value of your entry point will be assigned to the `module.exports.[output.library.name]`.
1292
1292
1293
1293
T> Wondering the difference between CommonJS and CommonJS2 is? While they are similar, there are some subtle differences between them that are not usually relevant in the context of webpack. (For further details, please [read this issue](https://github.com/webpack/webpack/issues/1114).)
Copy file name to clipboardExpand all lines: src/content/guides/getting-started.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@ Now, since we'll be bundling our scripts, we have to update our `index.html` fil
201
201
</html>
202
202
```
203
203
204
-
T> A couple other script loading strategies exist. Deferred loading is one such alternative to the above, where instead scripts are consolidated into the `<head>` and are given the `defer` attribute. This strategy downloads the external script resource(s) in parallel with document parsing, and will execute the scripts in order of document appearance after parsing has finished. This is in contrast to the above, in which the parser pauses to download and then execute the external resource syncronously. To learn more about this process, MDN has a nice [`reference guide`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script#async_and_defer).
204
+
T> A couple other script loading strategies exist. Deferred loading is one such alternative to the above, where instead scripts are consolidated into the `<head>` and are given the `defer` attribute. This strategy downloads the external script resource(s) in parallel with document parsing, and will execute the scripts in order of document appearance after parsing has finished. This is in contrast to the above, in which the parser pauses to download and then execute the external resource synchronously. To learn more about this process, MDN has a nice [`reference guide`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script#async_and_defer).
205
205
206
206
In this setup, `index.js` explicitly requires `lodash` to be present, and binds it as `_` (no global scope pollution). By stating what dependencies a module needs, webpack can use this information to build a dependency graph. It then uses the graph to generate an optimized bundle where scripts will be executed in the correct order.
Copy file name to clipboardExpand all lines: src/content/plugins/normal-module-replacement-plugin.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,9 @@ new webpack.NormalModuleReplacementPlugin(resourceRegExp, newResource);
19
19
20
20
Note that the `resourceRegExp` is tested against the request you write in your code, not the resolved resource. For instance, `'./sum'` will be used to test instead of `'./sum.js'` when you have code `import sum from './sum'`.
21
21
22
-
Also please note that when using Windows, you have to accommodate for the different folder separator symbol. E.g. `/src\/environments\/environment\.ts/` won't work on Windows, you have to use `/src[\\/]environments[\\/]environment\.ts/,` instead.
22
+
23
+
Also please note that when using Windows, you have to accommodate the different folder separator symbol. E.g. `/src\/environments\/environment\.ts/` won't work on Windows, you have to use `/src[\\/]environments[\\/]environment\.ts/,` instead.
0 commit comments