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
These are the options that can be configured under the loader `options`.
194
+
These are the options that can be configured under the loader `options`. All comments accept an [`overrides`](#overrides) key in addition to `config` when defined as an object.
193
195
194
196
*`verbose`: Prints console statements of the updated `import()`s per module filepath during the webpack build. Useful for debugging your custom configurations.
195
197
*`webpackChunkName`
196
198
*`true`: Adds `webpackChunkName` comments to **all** dynamic imports using the full path to the imported module to construct the name, so `import('path/to/module')` becomes `import(/* webpackChunkName: "path-to-module" */ 'path/to/module')`. This is the default.
197
199
*`false`: Disables adding the `webpackChunkName` comment globally.
200
+
*`some/glob/**/*.js`|`['/some/globs/**/*.js']`: Adds the comment with the default behavior of slugifying (hyphenating) the import path.
198
201
*`config.active`: Boolean to enable/disable the comment.
199
202
*`config.basename`: Boolean to use only the basename from the import path as the chunk name. Some relative path imports may end up with the same basename depsite importing different modules. Use in areas where you know the basenames are unique.
200
203
*`webpackMode`
201
-
*`true`: Adds `webpackMode` comments to **all** dynamic imports using `lazy` so `import('path/to/module')` becomes `import(/* webpackMode: "lazy" */ 'path/to/module')`.
204
+
*`true`: Adds `webpackMode` comments to **all** dynamic imports using `lazy`, so `import('path/to/module')` becomes `import(/* webpackMode: "lazy" */ 'path/to/module')`.
202
205
*`false`: Disables adding the `webpackChunkName` comment globally. This is the default.
203
206
*`config.active`: Boolean to enable/disable the comment.
204
207
*`config.mode`: String to set the mode. `lazy`, `lazy-once`, `eager`, or `weak`.
205
208
*`webpackIgnore`
206
-
*`true`: Adds `webpackIgnore` comments to **all** dynamic imports`true` so `import('path/to/module')` becomes `import(/* webpackIgnore: true */ 'path/to/module')`.
209
+
*`true`: Adds `webpackIgnore` comments to **all** dynamic imports, so `import('path/to/module')` becomes `import(/* webpackIgnore: true */ 'path/to/module')`.
207
210
*`false`: Disables adding the `webpackIgnore` comment globally. This is the default.
208
211
*`some/glob/**/*.js`|`['/some/globs/**/*.js']`: Adds the comment with a value of `true` to all module filepaths that match the string or array of strings.
209
212
*`config.active`: Boolean to enable/disable the comment.
213
+
*`webpackPreload`
214
+
*`true`: Adds `webpackPreload` comments to **all** dynamic imports, so `import('path/to/module')` becomes `import(/* webpackPreload: true */ 'path/to/module')`.
215
+
*`false`: Disables adding the `webpackPreload` comment globally. This is the default.
216
+
*`some/glob/**/*.js`|`['/some/globs/**/*.js']`: Adds the comment with a value of `true` to all module filepaths that match the string or array of strings.
217
+
*`config.active`: Boolean to enable/disable the comment.
218
+
*`webpackPrefetch`
219
+
*`true`: Adds `webpackPrefetch` comments to **all** dynamic imports, so `import('path/to/module')` becomes `import(/* webpackPrefetch: true */ 'path/to/module')`.
220
+
*`false`: Disables adding the `webpackPrefetch` comment globally. This is the default.
221
+
*`some/glob/**/*.js`|`['/some/globs/**/*.js']`: Adds the comment with a value of `true` to all module filepaths that match the string or array of strings.
222
+
*`config.active`: Boolean to enable/disable the comment.
0 commit comments