Files
frost-navigation/vite.config.js

37 lines
733 B
JavaScript
Raw Permalink Normal View History

2024-08-26 14:07:57 +08:00
import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import legacy from '@vitejs/plugin-legacy';
2024-08-26 14:07:57 +08:00
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: './',
build: {
assetsInlineLimit: 0,
},
2024-08-26 14:07:57 +08:00
envPrefix: 'V_ENV_',
plugins: [
legacy({
renderLegacyChunks: true,
renderModernChunks: true,
targets: ['defaults', 'not IE 11'],
}),
2024-08-26 14:07:57 +08:00
vue(),
vueJsx(),
],
resolve: {
alias: {
'@': getPath('./src'),
'@package-json': getPath('./package.json'),
},
},
server: {
port: 9000,
},
});