diff --git a/rollup/rollup.config.ts b/rollup/rollup.config.ts index 1c13780d..9eb90d27 100644 --- a/rollup/rollup.config.ts +++ b/rollup/rollup.config.ts @@ -840,11 +840,6 @@ export default (args: Record): rollup.RollupOptions[] => { }).code } }, - copy({ - targets: [ - { src: ['README.md'], dest: 'dist/main' } - ] - }), metadataPlugin({ // generate package.json and service-override packages getGroup (id: string, options) { @@ -1114,12 +1109,18 @@ export default (args: Record): rollup.RollupOptions[] => { }), { name: 'clean-src', async generateBundle () { - // Delete intermediate sources before writing to make sur there is no unused files + // Delete intermediate sources before writing to make sure there is no unused files await fsPromise.rm(DIST_DIR_MAIN, { recursive: true }) } - } + }, + copy({ + hook: 'generateBundle', + targets: [ + { src: ['README.md'], dest: 'dist/main' } + ] + }) ] }]) }