Skip to content
This repository was archived by the owner on Oct 30, 2020. It is now read-only.

Commit 60148cf

Browse files
committed
improve readme.md
1 parent 11e2f00 commit 60148cf

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,22 @@ The loader uses `css-loader`(https://github.com/webpack/css-loader) under the ho
135135

136136
## Known issues
137137

138-
- There may be a lag or a reload necessary when adding a new style-file to your project as the typescript loader may take a while to "find" the new typings file.
138+
### Webpack rebuilds / builds slow
139+
140+
As the loader generates typing files, it is wise to tell webpack to ignore them.
141+
The fix is luckily very simple. Webpack ships with a "WatchIgnorePlugin" out of the box.
142+
Simply add this to your webpack plugins:
143+
```
144+
plugins: [
145+
new webpack.WatchIgnorePlugin([
146+
/css\.d\.ts$/
147+
]),
148+
...
149+
]
150+
```
151+
where `css` is the file extension of your style files. If you use `sass` you need to put `sass` here instead. If you use `less`, `stylus` or any other style language use their file ending.
152+
153+
### Typescript doesnt find the typings
154+
155+
As the webpack process is independent from your typescript "runtime" it may take a while for typescript to pick up the typings.
156+
Any hints on how this could be fixed deterministically are welcome!

0 commit comments

Comments
 (0)