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
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -233,6 +233,25 @@ Works the same way as you'd configure it for normal CSS. Example usage with [min
233
233
}
234
234
```
235
235
236
+
## SSR externals
237
+
238
+
In SSR, we typically use `webpack-node-externals` to exclude npm dependencies from the server build. If you need to import CSS from an npm dependency, the previous solution was using a whitelist like this:
239
+
240
+
```js
241
+
// webpack config
242
+
externals:nodeExternals({
243
+
whitelist:/\.css$/
244
+
})
245
+
```
246
+
247
+
With v15, imports for `<style src="dep/foo.css">` now has resourceQuery strings appended at the end of the request, so you need to update the above to:
248
+
249
+
```js
250
+
externals:nodeExternals({
251
+
whitelist: [/\.css$/,/\?vue&type=style/]
252
+
})
253
+
```
254
+
236
255
## Options Deprecation
237
256
238
257
The following options have been deprecated and should be configured using normal webpack module rules:
0 commit comments