23 lines
416 B
JavaScript
23 lines
416 B
JavaScript
|
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({
|
||
|
resolve: {
|
||
|
alias: [
|
||
|
// /@/xxxx => src/xxxx
|
||
|
{
|
||
|
find: /\/@\//,
|
||
|
replacement: pathResolve('src') + '/',
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
plugins: [vue()]
|
||
|
})
|