chore: add rollup-plugin-copy

This commit is contained in:
草鞋没号
2020-12-24 18:36:41 +08:00
parent b487cbab1e
commit 519728e0cd
3 changed files with 64 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ import commonjs from '@rollup/plugin-commonjs'
import esbuild from 'rollup-plugin-esbuild'
import alias from '@rollup/plugin-alias'
import json from '@rollup/plugin-json'
import copy from 'rollup-plugin-copy'
export default (env = 'production') => {
const options: RollupOptions = {
@@ -46,6 +47,9 @@ export default (env = 'production') => {
entries: [
{ find: '@main', replacement: join(__dirname, '../src/main'), },
]
}),
copy({
targets: [{ src: join(__dirname, '../src/preload'), dest: join(__dirname, '../dist') }],
})
],
external: [