If there is a plugin that modifies a file within the watching root directory after a build (e.g. rollup-plugin-copy), Nollup will perform another build operation, ending up in a infinite building loop.
rollup.config.js:
import copy from 'rollup-plugin-copy'
const outputPath = path.join('./build',proc.env.BUILD_TYPE==="production"?"prod":"dev");
let config = {
treeshake: true,
input: './src/main.js',
output: {
file: path.join(outputPath,'app.js'),
format: 'es'
},
plugins: [
copy({targets:[
{ src: 'assets/**/*', dest: outputPath },
]}),
]
}
While this would enable support for HMR on static assets, this might create unstable behaviour in the server, as well as polluting the server console with build messages.
I'm not sure if there is an existing workaround, or if there could be a better way to pack assets for both development and production builds.
If there is a plugin that modifies a file within the watching root directory after a build (e.g. rollup-plugin-copy), Nollup will perform another build operation, ending up in a infinite building loop.
rollup.config.js:
While this would enable support for HMR on static assets, this might create unstable behaviour in the server, as well as polluting the server console with build messages.
I'm not sure if there is an existing workaround, or if there could be a better way to pack assets for both development and production builds.