refactor: better chunk filenames

pull/183/head
Evan You 4 years ago
parent ade6dddbb5
commit 2bb40d2875

@ -145,7 +145,12 @@ export async function bundle(
}, },
rollupOutputOptions: { rollupOutputOptions: {
...rollupOutputOptions, ...rollupOutputOptions,
chunkFileNames: `common-[hash].js` chunkFileNames: (chunk) => {
if (/runtime-dom/.test(chunk.name)) {
return `framework.[hash].js`
}
return `[name].[hash].js`
}
}, },
silent: !process.env.DEBUG, silent: !process.env.DEBUG,
minify: !process.env.DEBUG minify: !process.env.DEBUG

Loading…
Cancel
Save