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

ie11兼容测试

parent 22e392b3
Pipeline #52307 passed with stage
This diff is collapsed.
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import babel from '@rollup/plugin-babel';
import legacyPlugin from 'vite-plugin-legacy'
const path = require('path')
console.log(__dirname);
......@@ -11,7 +11,27 @@ function resolve_path (dir) {
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:'./',
clearScreen:false,
resolve:{
......@@ -32,20 +52,5 @@ export default defineConfig({
outDir:'dist/zjhl',
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