You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 30, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,4 +135,22 @@ The loader uses `css-loader`(https://github.com/webpack/css-loader) under the ho
135
135
136
136
## Known issues
137
137
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