mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +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 = {
|
const options: RollupConfig = {
|
||||||
input: config.entry,
|
input: config.entry,
|
||||||
output: {
|
output: {
|
||||||
file: path.resolve(config.buildDir, 'dist/server', `index.${config.target}.js`),
|
file: path.resolve(config.buildDir, `dist/${config.target}`, 'index.js'),
|
||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
intro: '',
|
intro: '',
|
||||||
outro: '',
|
outro: '',
|
||||||
@ -65,7 +65,7 @@ export const getRollupConfig = (config) => {
|
|||||||
options.output.intro += 'const requireDynamic = require;'
|
options.output.intro += 'const requireDynamic = require;'
|
||||||
options.plugins.push(replace({
|
options.plugins.push(replace({
|
||||||
values: {
|
values: {
|
||||||
'require("./" +': 'requireDynamic("./" +'
|
'require("./" +': 'requireDynamic("../server/" +'
|
||||||
},
|
},
|
||||||
delimiters: ['', '']
|
delimiters: ['', '']
|
||||||
}))
|
}))
|
||||||
|
Loading…
Reference in New Issue
Block a user