You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.1 KiB
TypeScript

import { resolve } from 'path';
import { defineConfig } from 'vite';
import alias from '@rollup/plugin-alias';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import svgLoader from 'vite-svg-loader';
export default defineConfig({
plugins: [alias(), vue(), vueJsx(), svgLoader({ svgoConfig: {} })],
resolve: {
alias: [
{
find: '@',
replacement: resolve(__dirname, '../src'),
},
{
find: 'assets',
replacement: resolve(__dirname, '../src/assets'),
},
{
find: 'vue-i18n',
replacement: 'vue-i18n/dist/vue-i18n.cjs.js',
},
{
find: 'vue',
replacement: 'vue/dist/vue.esm-bundler.js',
},
],
extensions: ['.ts', '.js'],
},
server: {
host: '0.0.0.0',
port: 80,
},
define: {
'process.env': {},
},
css: {
preprocessorOptions: {
less: {
modifyVars: {
hack: `true; @import (reference) "${resolve(
'src/assets/style/breakpoint.less'
)}";`,
},
javascriptEnabled: true,
},
},
},
});