30 lines
511 B
JavaScript
30 lines
511 B
JavaScript
|
import {fileURLToPath, URL} from 'url'
|
||
|
|
||
|
import {defineConfig} from 'vite'
|
||
|
import vue from '@vitejs/plugin-vue'
|
||
|
|
||
|
function pathTo(path) {
|
||
|
return fileURLToPath(new URL(path, import.meta.url));
|
||
|
}
|
||
|
|
||
|
// https://vitejs.dev/config/
|
||
|
export default defineConfig({
|
||
|
plugins: [vue()],
|
||
|
resolve: {
|
||
|
alias: {
|
||
|
'@': pathTo('./src', import.meta.url),
|
||
|
'@node_modules': pathTo('./node_modules'),
|
||
|
}
|
||
|
},
|
||
|
server: {
|
||
|
host: true,
|
||
|
port: 3000,
|
||
|
cors: false,
|
||
|
},
|
||
|
preview: {
|
||
|
host: true,
|
||
|
port: 3000,
|
||
|
cors: false,
|
||
|
}
|
||
|
})
|