Skip to content

Commit 56250a6

Browse files
committed
Update require-extension.md with information on setting up Webpack.
1 parent bed60d4 commit 56250a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/rules/require-extension.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ The set of forbidden extensions is configurable. By default '.jsx' is blocked. I
3333
}
3434
```
3535

36+
To configure WebPack to resolve '.jsx' add the following to `webpack.config.js`:
37+
38+
```js
39+
resolve: {
40+
extensions: ["", ".js", ".jsx"]
41+
},
42+
```
43+
3644
## When Not To Use It
3745

3846
If you have file in your project with a '.jsx' file extension and do not have `require()` configured to automatically resolve '.jsx' files.

0 commit comments

Comments
 (0)