mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 01:53:55 +00:00
parent
f718a33548
commit
c8f8691496
@ -50,7 +50,14 @@ export async function buildServer (ctx: ViteBuildContext) {
|
|||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
cacheDirPlugin(ctx.nuxt.options.rootDir, 'server'),
|
cacheDirPlugin(ctx.nuxt.options.rootDir, 'server'),
|
||||||
vuePlugin(),
|
vuePlugin({
|
||||||
|
// workaround for https://github.com/vuejs/vue-next/issues/4666
|
||||||
|
template: {
|
||||||
|
compilerOptions: {
|
||||||
|
ssrRuntimeModuleName: 'vue/server-renderer/index.mjs'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}),
|
||||||
transformNuxtSetup()
|
transformNuxtSetup()
|
||||||
]
|
]
|
||||||
} as ViteOptions)
|
} as ViteOptions)
|
||||||
|
@ -14,7 +14,13 @@ export function vue (ctx: WebpackConfigContext) {
|
|||||||
config.module.rules.push({
|
config.module.rules.push({
|
||||||
test: /\.vue$/i,
|
test: /\.vue$/i,
|
||||||
loader: 'vue-loader',
|
loader: 'vue-loader',
|
||||||
options: options.build.loaders.vue
|
options: {
|
||||||
|
// workaround for https://github.com/vuejs/vue-next/issues/4666
|
||||||
|
compilerOptions: {
|
||||||
|
ssrRuntimeModuleName: 'vue/server-renderer/index.mjs'
|
||||||
|
},
|
||||||
|
...options.build.loaders.vue
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if (ctx.isClient) {
|
if (ctx.isClient) {
|
||||||
|
Loading…
Reference in New Issue
Block a user