Skip to content

Commit

Permalink
fix: resolve runtime provided dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 4, 2020
1 parent 6cc53a4 commit 3e9e27e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/rollup/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export const getRollupConfig = (config) => {
'@vue/compiler-ssr'
]

const providedDeps = [
'@nuxt/devalue',
'vue-bundle-renderer'
]

const extensions = ['.ts', '.mjs', '.js', '.json', '.node']

const external = []
Expand Down Expand Up @@ -87,7 +92,8 @@ export const getRollupConfig = (config) => {
'~renderer': require.resolve(path.resolve(RUNTIME_DIR, renderer)),
'~build': config.buildDir,
'~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) }), {})
}
}))

Expand Down

0 comments on commit 3e9e27e

Please sign in to comment.