After the project is packaged, use a browser with a lower version to open it and report an error
Solution
Vue config.js
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import legacy from '@vitejs/plugin-legacy';
// https://vitejs.dev/config/
export default defineConfig({
base: './',
plugins: [
vue(),
legacy({
targets: ['> 1%, last 1 version, ie >= 11'],
additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
}),
],
});
Read More:
- [Solved] vite package Error: globalThis is not defined
- How to Solve Vue cli configuration SCSS global variable error
- The vue3 project Error: Cannot find module’vue-loader-v16/package.json’
- [Solved] vue3vite Error: Failed to resolve import “@vue/server-renderer from “src\App.vue“. Does the file exist
- [webpack-cli] Error: Cannot find module ‘vue/compiler-sfc‘
- [Solved] Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.
- [Solved] Error: Cannot find module ‘@vue/cli-shared-utils
- [Solved] Error: Cannot find module ‘@vue/cli-shared-utils‘
- When starting Vue project: cannot find module ‘webpack cli/bin/config yargs’ error resolution
- [Solved] Vue package error: Syntax Error: Error: Cannot find module ‘mozjpeg’
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function
- [Solved] Vue Project Error: Error: Cannot find module ‘webpack‘ Require stack以及Error: Rule can only have one resource so
- [Solved] Syntax Error: Error: Cannot find module ‘@vue/babel-preset-app‘
- [Solved] Vue Install loader Error: Syntax Error: Error: Cannot find module ‘less‘
- Vue project Run Error: Syntax Error: Error: Cannot find module ‘less‘
- Vue installation @ Vue/cli error: npmerr gyp err
- Vue2.0: How to Use vue3 api to encapsulate Axios
- [Solved] Vue3.0 Error: The component has been registered but not used vue/no-unused-components, Close eslint
- Full screen scrolling by Vue + Vue awesomeswiper
- [Solved] Vue Error: Uncaught TypeError: Vue.createApp is not a function