mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
export targets to individual dir
This commit is contained in:
parent
b03eef0ceb
commit
9959411f60
@ -43,7 +43,7 @@ export const getRollupConfig = (config) => {
|
||||
const options: RollupConfig = {
|
||||
input: config.entry,
|
||||
output: {
|
||||
file: path.resolve(config.buildDir, 'dist/server', `index.${config.target}.js`),
|
||||
file: path.resolve(config.buildDir, `dist/${config.target}`, 'index.js'),
|
||||
format: 'cjs',
|
||||
intro: '',
|
||||
outro: '',
|
||||
@ -65,7 +65,7 @@ export const getRollupConfig = (config) => {
|
||||
options.output.intro += 'const requireDynamic = require;'
|
||||
options.plugins.push(replace({
|
||||
values: {
|
||||
'require("./" +': 'requireDynamic("./" +'
|
||||
'require("./" +': 'requireDynamic("../server/" +'
|
||||
},
|
||||
delimiters: ['', '']
|
||||
}))
|
||||
|
Loading…
Reference in New Issue
Block a user