Commit 4d771b88 authored by 张俊's avatar 张俊

ie11兼容测试

parent 22e392b3
Pipeline #52307 passed with stage
This diff is collapsed.
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"axios": "^0.21.1", "axios": "^0.21.1",
"core-js": "^3.15.2", "core-js": "^3.15.2",
"sass": "^1.35.1", "sass": "^1.35.1",
"vite-plugin-legacy": "^2.1.0",
"vue": "^3.0.5", "vue": "^3.0.5",
"vue-i18n": "^9.1.7", "vue-i18n": "^9.1.7",
"vue-router": "^4.0.10", "vue-router": "^4.0.10",
......
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import babel from '@rollup/plugin-babel'; import legacyPlugin from 'vite-plugin-legacy'
const path = require('path') const path = require('path')
console.log(__dirname); console.log(__dirname);
...@@ -11,7 +11,27 @@ function resolve_path (dir) { ...@@ -11,7 +11,27 @@ function resolve_path (dir) {
export default defineConfig({ export default defineConfig({
plugins: [vue()], plugins: [
vue(),
// The default options are listed below. Pass nothing to use them.
legacyPlugin({
// The browsers that must be supported by your legacy bundle.
// https://babeljs.io/docs/en/babel-preset-env#targets
targets: [ 'ie >= 11' ],
// Define which polyfills your legacy bundle needs. They will be loaded
// from the Polyfill.io server. See the "Polyfills" section for more info.
polyfills: [
// Empty by default
],
// Toggles whether or not browserslist config sources are used.
// https://babeljs.io/docs/en/babel-preset-env#ignorebrowserslistconfig
ignoreBrowserslistConfig: false,
// When true, core-js@3 modules are inlined based on usage.
// When false, global namespace APIs (eg: Object.entries) are loaded
// from the Polyfill.io server.
corejs: false,
})
],
base:'./', base:'./',
clearScreen:false, clearScreen:false,
resolve:{ resolve:{
...@@ -32,20 +52,5 @@ export default defineConfig({ ...@@ -32,20 +52,5 @@ export default defineConfig({
outDir:'dist/zjhl', outDir:'dist/zjhl',
assetsDir:'static' assetsDir:'static'
}, },
rollupInputOptions: {
plugins: [
babel({
presets: [[
"@babel/preset-env",
{
"corejs": 2,
"useBuiltIns": "usage",
"targets": {
"ie": "11"
}
}
]]
})
],
}
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment