build: 添加 @vitejs/plugin-legacy 插件,支持传统浏览器,支持直接以文件方式打开
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { fileURLToPath, URL } from 'node:url';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
import legacy from '@vitejs/plugin-legacy';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||
|
||||
@@ -10,8 +11,16 @@ function getPath(url = '') {
|
||||
|
||||
export default defineConfig({
|
||||
base: './',
|
||||
build: {
|
||||
assetsInlineLimit: 0,
|
||||
},
|
||||
envPrefix: 'V_ENV_',
|
||||
plugins: [
|
||||
legacy({
|
||||
renderLegacyChunks: true,
|
||||
renderModernChunks: true,
|
||||
targets: ['defaults', 'not IE 11'],
|
||||
}),
|
||||
vue(),
|
||||
vueJsx(),
|
||||
],
|
||||
|
Reference in New Issue
Block a user