1
0
mirror of synced 2025-12-09 10:37:55 +08:00

build(playground): 增加@vitejs/plugin-legacy插件

This commit is contained in:
roymondchen
2022-05-12 16:12:18 +08:00
committed by jia000
parent e9e3691c79
commit f9d23a4423
3 changed files with 48 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "node --max_old_space_size=8192 node_modules/.bin/vite build",
"serve": "vite preview"
},
"dependencies": {
@@ -21,6 +21,7 @@
},
"devDependencies": {
"@types/node": "^15.12.4",
"@vitejs/plugin-legacy": "^1.8.2",
"@vitejs/plugin-vue": "^1.2.3",
"@vitejs/plugin-vue-jsx": "^1.1.6",
"@vue/compiler-sfc": "^3.2.0",

View File

@@ -19,12 +19,19 @@
import path from 'path';
import { defineConfig } from 'vite';
import legacy from '@vitejs/plugin-legacy';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), vueJsx()],
plugins: [
vue(),
vueJsx(),
legacy({
targets: ['defaults', 'not IE 11'],
}),
],
base: '/tmagic-editor/playground',