mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
fix(rollup): set correct output options
This commit is contained in:
parent
de28c26284
commit
fc1ab1eb44
@ -27,11 +27,14 @@ export default function rollupConfig({
|
|||||||
pkg = readJSONSync(path.resolve(rootDir, 'package.json'))
|
pkg = readJSONSync(path.resolve(rootDir, 'package.json'))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const name = path.basename(pkg.name.replace('-edge', ''))
|
||||||
|
|
||||||
return defaultsDeep({}, options, {
|
return defaultsDeep({}, options, {
|
||||||
input: path.resolve(rootDir, input),
|
input: path.resolve(rootDir, input),
|
||||||
output: {
|
output: {
|
||||||
file: `${pkg.name.replace('-edge', '')}.js`,
|
|
||||||
dir: path.resolve(rootDir, 'dist'),
|
dir: path.resolve(rootDir, 'dist'),
|
||||||
|
entryFileNames: `${name}.js`,
|
||||||
|
chunkFileNames: `${name}-[name].js`,
|
||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
preferConst: true
|
preferConst: true
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user