2021-09-01 11:26:19 +08:00
|
|
|
import { defineConfig } from 'vite';
|
2021-10-18 17:04:47 +08:00
|
|
|
import { viteMockServe } from 'vite-plugin-mock';
|
|
|
|
import createVuePlugin from '@vitejs/plugin-vue';
|
2021-08-26 11:25:15 +08:00
|
|
|
import vueJsx from '@vitejs/plugin-vue-jsx';
|
2021-11-19 15:25:24 +08:00
|
|
|
import svgLoader from 'vite-svg-loader';
|
2021-08-26 11:25:15 +08:00
|
|
|
|
2021-10-18 17:04:47 +08:00
|
|
|
import path from 'path';
|
2021-08-26 11:25:15 +08:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@': path.resolve(__dirname, './src'),
|
|
|
|
},
|
|
|
|
},
|
2021-10-18 17:04:47 +08:00
|
|
|
|
2021-08-26 11:25:15 +08:00
|
|
|
plugins: [
|
2021-10-18 17:04:47 +08:00
|
|
|
createVuePlugin(),
|
2021-09-01 11:26:19 +08:00
|
|
|
vueJsx(),
|
2021-10-18 17:04:47 +08:00
|
|
|
viteMockServe({
|
|
|
|
mockPath: 'mock',
|
|
|
|
localEnabled: true,
|
|
|
|
}),
|
2021-11-16 19:01:03 +08:00
|
|
|
svgLoader(),
|
2021-08-26 11:25:15 +08:00
|
|
|
],
|
2021-10-18 17:04:47 +08:00
|
|
|
|
2021-08-26 11:25:15 +08:00
|
|
|
server: {
|
|
|
|
port: 3002,
|
|
|
|
},
|
2021-09-01 11:26:19 +08:00
|
|
|
});
|