build & ci: 修改打包工具为Vite

This commit is contained in:
lblblong
2021-11-02 14:22:17 +08:00
parent e503d77cf5
commit cc0d6beb3e
25 changed files with 505 additions and 77 deletions
+25
View File
@@ -0,0 +1,25 @@
import react from '@vitejs/plugin-react'
import path from 'path'
import { defineConfig } from 'vite'
// https://vitejs.dev/config/
export default defineConfig({
build: {
sourcemap: false,
outDir: 'build'
},
base: './',
plugins: [react()],
resolve: {
alias: [
{
find: 'src/',
replacement: path.resolve(__dirname, 'src') + '/',
},
{
find: /^~/,
replacement: '',
},
],
}
})