从webpack迁移到vite

This commit is contained in:
lyswhut
2023-08-07 18:49:14 +08:00
parent 31e16a7ed7
commit 028bf5919d
166 changed files with 3071 additions and 11869 deletions
+27
View File
@@ -0,0 +1,27 @@
import fs from 'node:fs'
import path from 'node:path'
const rootPath = path.join(__dirname, '../../')
const assets = [
[
path.join(rootPath, './src/main/modules/userApi/renderer/user-api.html'),
path.join(rootPath, './dist/main/user-api.html'),
],
[
path.join(rootPath, './src/static'),
path.join(rootPath, './dist/static'),
],
[
path.join(rootPath, './src/common/theme/theme_images'),
path.join(rootPath, './dist/renderer/theme_images'),
],
] as const
export default async() => {
for (const [from, to] of assets) {
await fs.promises.cp(from, to, {
recursive: true,
})
}
}