Skip to content

Commit

Permalink
update docs for latest webpack 5 syntax (#1244)
Browse files Browse the repository at this point in the history
Co-authored-by: John Reilly <johnny_reilly@hotmail.com>
  • Loading branch information
e56 and johnnyreilly authored Feb 10, 2021
1 parent e9c2677 commit 591bd10
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -729,12 +729,22 @@ In order to make use of this option your project needs to be correctly configure
Because TS will generate .js and .d.ts files, you should ignore these files, otherwise watchers may go into an infinite watch loop. For example, when using webpack, you may wish to add this to your webpack.conf.js file:

```javascript
// for webpack 4
plugins: [
new webpack.WatchIgnorePlugin([
/\.js$/,
/\.d\.ts$/
])
],

// for webpack 5
plugins: [
new webpack.WatchIgnorePlugin(

This comment has been minimized.

Copy link
@StarpTech

StarpTech Feb 17, 2021

Missing bracket.

paths:{[
/\.js$/,
/\.d\.ts$/
]})
],
```

It's worth noting that use of the `LoaderOptionsPlugin` is [only supposed to be a stopgap measure](https://webpack.js.org/plugins/loader-options-plugin/). You may want to look at removing it entirely.
Expand Down

0 comments on commit 591bd10

Please sign in to comment.