2022-04-07 22:17:28 +08:00
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
import { resolve } from 'path'
|
|
|
|
|
|
|
|
|
|
|
|
function pathResolve(dir) {
|
|
|
|
return resolve(process.cwd(), '.', dir);
|
|
|
|
}
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2024-05-31 15:40:57 +08:00
|
|
|
base: './',
|
2022-04-07 22:17:28 +08:00
|
|
|
resolve: {
|
|
|
|
alias: [
|
|
|
|
// /@/xxxx => src/xxxx
|
|
|
|
{
|
|
|
|
find: /\/@\//,
|
|
|
|
replacement: pathResolve('src') + '/',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
plugins: [vue()]
|
|
|
|
})
|