Skip to content

Commit a444ae4

Browse files
authored
docs(configuration): remove enforceModuleExtension from resolve docs (#5296)
* docs(configuration): remove resolve.enforceModuleExtension * docs(configuration): remove resolveLoader.enforceModuleExtension
1 parent a95ae23 commit a444ae4

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

src/content/configuration/resolve.mdx

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -226,25 +226,6 @@ module.exports = {
226226
};
227227
```
228228

229-
### `resolve.enforceModuleExtension`
230-
231-
`boolean = false`
232-
233-
W> Removed in webpack 5
234-
235-
Tells webpack whether to require to use an extension for modules (e.g. loaders).
236-
237-
**webpack.config.js**
238-
239-
```js
240-
module.exports = {
241-
//...
242-
resolve: {
243-
enforceModuleExtension: false,
244-
},
245-
};
246-
```
247-
248229
### resolve.extensions
249230

250231
`[string] = ['.js', '.json', '.wasm']`
@@ -681,22 +662,3 @@ module.exports = {
681662
```
682663
683664
T> Note that you can use alias here and other features familiar from resolve. For example `{ txt: 'raw-loader' }` would shim `txt!templates/demo.txt` to use `raw-loader`.
684-
685-
### `resolveLoader.moduleExtensions`
686-
687-
`[string]`
688-
689-
W> Removed in webpack 5
690-
691-
The extensions/suffixes that are used when resolving loaders. Since version two, we [strongly recommend](/migrate/3/#automatic--loader-module-name-extension-removed) using the full name, e.g. `example-loader`, as much as possible for clarity. However, if you really wanted to exclude the `-loader` bit, i.e. to only use `example`, you can use this option to do so:
692-
693-
**webpack.config.js**
694-
695-
```js
696-
module.exports = {
697-
//...
698-
resolveLoader: {
699-
moduleExtensions: ['-loader'],
700-
},
701-
};
702-
```

0 commit comments

Comments
 (0)