Skip to content

Commit

Permalink
demonstrated usability with watchers such as webpack -w
Browse files Browse the repository at this point in the history
demonstrated usability with watchers such as webpack -w
  • Loading branch information
ORESoftware committed Oct 24, 2017
1 parent 3fcb7e9 commit 9136ec4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Expand Up @@ -415,6 +415,19 @@ Or if you want to use only tsx, just use the `appendTsxSuffixTo` option only:
}
})
```

### Usage with Webpack watch

Because TS will generated .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:

```js
plugins: [
new webpack.WatchIgnorePlugin([
/\.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 9136ec4

Please sign in to comment.