mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
fix: whitelist vue&type=style in SSR bundle
This commit is contained in:
parent
21882caa50
commit
dfab96fdb7
@ -59,12 +59,16 @@ export default class WebpackServerConfig extends BaseConfig {
|
||||
|
||||
// https://webpack.js.org/configuration/externals/#externals
|
||||
// https://github.com/liady/webpack-node-externals
|
||||
// https://vue-loader.vuejs.org/migrating.html#ssr-externals
|
||||
this.options.modulesDir.forEach(dir => {
|
||||
if (fs.existsSync(dir)) {
|
||||
config.externals.push(
|
||||
nodeExternals({
|
||||
// load non-javascript files with extensions, presumably via loaders
|
||||
whitelist: [/es6-promise|\.(?!(?:js|json)$).{1,5}$/i],
|
||||
whitelist: [
|
||||
/es6-promise|\.(?!(?:js|json)$).{1,5}$/i,
|
||||
/\.css$/,
|
||||
/\?vue&type=style/
|
||||
],
|
||||
modulesDir: dir
|
||||
})
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user