mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
fix: resolve runtime provided dependencies
This commit is contained in:
parent
5538f342f7
commit
16141efe25
@ -32,6 +32,11 @@ export const getRollupConfig = (config) => {
|
|||||||
'@vue/compiler-ssr'
|
'@vue/compiler-ssr'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const providedDeps = [
|
||||||
|
'@nuxt/devalue',
|
||||||
|
'vue-bundle-renderer'
|
||||||
|
]
|
||||||
|
|
||||||
const extensions = ['.ts', '.mjs', '.js', '.json', '.node']
|
const extensions = ['.ts', '.mjs', '.js', '.json', '.node']
|
||||||
|
|
||||||
const external = []
|
const external = []
|
||||||
@ -87,7 +92,8 @@ export const getRollupConfig = (config) => {
|
|||||||
'~renderer': require.resolve(path.resolve(RUNTIME_DIR, renderer)),
|
'~renderer': require.resolve(path.resolve(RUNTIME_DIR, renderer)),
|
||||||
'~build': config.buildDir,
|
'~build': config.buildDir,
|
||||||
'~mock': require.resolve(path.resolve(RUNTIME_DIR, 'mock')),
|
'~mock': require.resolve(path.resolve(RUNTIME_DIR, 'mock')),
|
||||||
...mocks.reduce((p, c) => ({ ...p, [c]: '~mock' }), {})
|
...mocks.reduce((p, c) => ({ ...p, [c]: '~mock' }), {}),
|
||||||
|
...providedDeps.reduce((p, c) => ({ ...p, [c]: require.resolve(c) }), {})
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user