zhuf 1 gadu atpakaļ
vecāks
revīzija
77d8803823
3 mainītis faili ar 1552 papildinājumiem un 23 dzēšanām
  1. 1 0
      package.json
  2. 1524 22
      pnpm-lock.yaml
  3. 27 1
      vite.config.js

+ 1 - 0
package.json

@@ -19,6 +19,7 @@
   },
   "devDependencies": {
     "@iconify/json": "^2.1.98",
+    "@vitejs/plugin-legacy": "^4.1.1",
     "@vitejs/plugin-vue": "^3.0.3",
     "sass": "^1.54.5",
     "unplugin-auto-import": "^0.11.2",

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1524 - 22
pnpm-lock.yaml


+ 27 - 1
vite.config.js

@@ -7,10 +7,13 @@ import Components from 'unplugin-vue-components/vite'
 import { VantResolver } from 'unplugin-vue-components/resolvers'
 import Icons from 'unplugin-icons/vite'
 import IconsResolver from 'unplugin-icons/resolver'
+import legacy from '@vitejs/plugin-legacy'
 
 // https://vitejs.dev/config/
 export default defineConfig({
-  base:'/page/new/',
+
+
+  base: '/page/new/',
   resolve: {
     alias: {
       '@': path.resolve(__dirname, 'src'),
@@ -31,6 +34,29 @@ export default defineConfig({
     }
   },
   plugins: [
+    legacy({
+      targets: ['defaults', 'ie >= 11', 'chrome 52'],  //需要兼容的目标列表,可以设置多个
+      additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
+      renderLegacyChunks: true,
+      polyfills: [
+        'es.symbol',
+        'es.array.filter',
+        'es.promise',
+        'es.promise.finally',
+        'es/map',
+        'es/set',
+        'es.array.for-each',
+        'es.object.define-properties',
+        'es.object.define-property',
+        'es.object.get-own-property-descriptor',
+        'es.object.get-own-property-descriptors',
+        'es.object.keys',
+        'es.object.to-string',
+        'web.dom-collections.for-each',
+        'esnext.global-this',
+        'esnext.string.match-all'
+      ]
+    }),
     vue({
       reactivityTransform: true
     }),