chore: 初始化文件结构
This commit is contained in:
27
vite.config.js
Normal file
27
vite.config.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import { fileURLToPath, URL } from 'node:url';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||
|
||||
function getPath(url = '') {
|
||||
return fileURLToPath(new URL(url, import.meta.url));
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
base: './',
|
||||
envPrefix: 'V_ENV_',
|
||||
plugins: [
|
||||
vue(),
|
||||
vueJsx(),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': getPath('./src'),
|
||||
'@package-json': getPath('./package.json'),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 9000,
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user