Skip to content

Nollup get stuck constantly building if there are file modifications by plugins after a build #207

Description

@YonicDev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions