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
- [vite] Failed to parse source for import analysis because the content contains invalid JS syntax.
- [Solved] Some chunks are bigger warning on vite packaging
- [Solved] Vite packing error: some chunks are larger than 500kb after minification
- After Vite starts, it will prompt “network: use ` — host ` to expose”, and the service cannot be accessed through network IP
- [Solved] Error: Transform failed with 1 error: error: Invalid option in transform() call: “jsx“
- [Solved] Vue3 process Error: Uncaught ReferenceError: process is not defined
- How to Solve Vue project Startup Error (Node Upgrade issue)
- [Solved] Error:Plugin/Preset files are not allowed to export objects, only functions
- Vue Install less Error: While resolving: [email protected]
- [Solved] Vue Use gzip Package Error: Rule can only have one resource source
- Vue3 Error: [vue/no-multiple-template-root] The template root requires exactly one element
- [Solved] Vue 3 Script Setup ESLint Error: ‘defineProps‘ is not defined
- [Solved] Uncaught SyntaxError: The requested module does not provide an export named
- [Solved] Vue item error: Regeneratorruntime is not defined
- [Solved] vue3vite Error: Failed to resolve import “@vue/server-renderer from “src\App.vue“. Does the file exist
- [Solved] Syntax Error: Error: No ESLint configuration found & TypeError: eslint.CLIEngine is not a constructor
- [Solved] Component name “login“ should always be multi-word.
- npm ERR code ELIFECYCLE [How to Solve]
- [Solved] Npm install Error: verbose stack Error: unable to resolve dependency tree