Add legacy browser support and drop @vue/compat
This commit is contained in:
parent
9b0dcaae65
commit
34c6cbe1bd
20
frontend/package-lock.json
generated
20
frontend/package-lock.json
generated
@ -8,7 +8,6 @@
|
|||||||
"name": "filebrowser-frontend",
|
"name": "filebrowser-frontend",
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/compat": "^3.3.4",
|
|
||||||
"@vueuse/core": "^10.4.1",
|
"@vueuse/core": "^10.4.1",
|
||||||
"ace-builds": "^1.24.1",
|
"ace-builds": "^1.24.1",
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
@ -30,7 +29,6 @@
|
|||||||
"vue-i18n": "^9.2.2",
|
"vue-i18n": "^9.2.2",
|
||||||
"vue-lazyload": "^3.0.0",
|
"vue-lazyload": "^3.0.0",
|
||||||
"vue-router": "^4.2.4",
|
"vue-router": "^4.2.4",
|
||||||
"vue-simple-progress": "^1.1.1",
|
|
||||||
"vue-toastification": "^2.0.0-rc.5"
|
"vue-toastification": "^2.0.0-rc.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -2533,19 +2531,6 @@
|
|||||||
"vue": "^3.2.25"
|
"vue": "^3.2.25"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vue/compat": {
|
|
||||||
"version": "3.3.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@vue/compat/-/compat-3.3.4.tgz",
|
|
||||||
"integrity": "sha512-VwAsPqUqRJVxeLQPUC03Sa5d+T8UG2Qv4VItq74KmNvtQlRXICpa/sqq12BcyBB4Tz1U5paOEZxWCUoXkrZ9QQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/parser": "^7.21.3",
|
|
||||||
"estree-walker": "^2.0.2",
|
|
||||||
"source-map-js": "^1.0.2"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"vue": "3.3.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@vue/compiler-core": {
|
"node_modules/@vue/compiler-core": {
|
||||||
"version": "3.3.4",
|
"version": "3.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz",
|
||||||
@ -6289,11 +6274,6 @@
|
|||||||
"vue": "^3.2.0"
|
"vue": "^3.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vue-simple-progress": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/vue-simple-progress/-/vue-simple-progress-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-ltLWYBA5eVQHWyt1NwZeGeK0VQC69JVh1oqUdro0po7r8Hc8SEMEyEfuwyCO4s27h5I3jbD99BKKkyPSQZgoZA=="
|
|
||||||
},
|
|
||||||
"node_modules/vue-toastification": {
|
"node_modules/vue-toastification": {
|
||||||
"version": "2.0.0-rc.5",
|
"version": "2.0.0-rc.5",
|
||||||
"resolved": "https://registry.npmjs.org/vue-toastification/-/vue-toastification-2.0.0-rc.5.tgz",
|
"resolved": "https://registry.npmjs.org/vue-toastification/-/vue-toastification-2.0.0-rc.5.tgz",
|
||||||
|
|||||||
@ -14,7 +14,6 @@
|
|||||||
"format": "prettier --write ."
|
"format": "prettier --write ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/compat": "^3.3.4",
|
|
||||||
"@vueuse/core": "^10.4.1",
|
"@vueuse/core": "^10.4.1",
|
||||||
"ace-builds": "^1.24.1",
|
"ace-builds": "^1.24.1",
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
@ -36,7 +35,6 @@
|
|||||||
"vue-i18n": "^9.2.2",
|
"vue-i18n": "^9.2.2",
|
||||||
"vue-lazyload": "^3.0.0",
|
"vue-lazyload": "^3.0.0",
|
||||||
"vue-router": "^4.2.4",
|
"vue-router": "^4.2.4",
|
||||||
"vue-simple-progress": "^1.1.1",
|
|
||||||
"vue-toastification": "^2.0.0-rc.5"
|
"vue-toastification": "^2.0.0-rc.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -55,10 +53,5 @@
|
|||||||
"vite": "^4.4.9",
|
"vite": "^4.4.9",
|
||||||
"vite-plugin-compression2": "^0.10.4",
|
"vite-plugin-compression2": "^0.10.4",
|
||||||
"vite-plugin-rewrite-all": "^1.0.1"
|
"vite-plugin-rewrite-all": "^1.0.1"
|
||||||
},
|
}
|
||||||
"browserslist": [
|
|
||||||
"> 1%",
|
|
||||||
"last 2 versions",
|
|
||||||
"not ie < 11"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { disableExternal } from "@/utils/constants";
|
import { disableExternal } from "@/utils/constants";
|
||||||
import { createApp, configureCompat } from "vue";
|
import { createApp } from "vue";
|
||||||
import VueLazyload from "vue-lazyload";
|
import VueLazyload from "vue-lazyload";
|
||||||
import Toast, { useToast } from "vue-toastification";
|
import Toast, { useToast } from "vue-toastification";
|
||||||
import createPinia from "@/stores";
|
import createPinia from "@/stores";
|
||||||
@ -8,8 +8,6 @@ import i18n, { rtlLanguages } from "@/i18n";
|
|||||||
import App from "@/App.vue";
|
import App from "@/App.vue";
|
||||||
import CustomToast from "@/components/CustomToast.vue";
|
import CustomToast from "@/components/CustomToast.vue";
|
||||||
|
|
||||||
configureCompat({ RENDER_FUNCTION: false });
|
|
||||||
|
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||||
import relativeTime from "dayjs/plugin/relativeTime";
|
import relativeTime from "dayjs/plugin/relativeTime";
|
||||||
|
|||||||
@ -2,27 +2,24 @@ import path from "node:path";
|
|||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import vue from "@vitejs/plugin-vue";
|
import vue from "@vitejs/plugin-vue";
|
||||||
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
|
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
|
||||||
|
import legacy from "@vitejs/plugin-legacy";
|
||||||
import { compression } from "vite-plugin-compression2";
|
import { compression } from "vite-plugin-compression2";
|
||||||
import pluginRewriteAll from "vite-plugin-rewrite-all";
|
import pluginRewriteAll from "vite-plugin-rewrite-all";
|
||||||
|
|
||||||
const plugins = [
|
const plugins = [
|
||||||
vue({
|
vue(),
|
||||||
template: {
|
|
||||||
compilerOptions: {
|
|
||||||
compatConfig: {
|
|
||||||
MODE: 3,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
VueI18nPlugin(),
|
VueI18nPlugin(),
|
||||||
|
legacy({
|
||||||
|
// defaults already drop IE support
|
||||||
|
targets: ["defaults"],
|
||||||
|
}),
|
||||||
compression({ include: /\.js$/i, deleteOriginalAssets: true }),
|
compression({ include: /\.js$/i, deleteOriginalAssets: true }),
|
||||||
pluginRewriteAll(), // fixes 404 error with paths containing dot in dev server
|
pluginRewriteAll(), // fixes 404 error with paths containing dot in dev server
|
||||||
];
|
];
|
||||||
|
|
||||||
const resolve = {
|
const resolve = {
|
||||||
alias: {
|
alias: {
|
||||||
vue: "@vue/compat",
|
// vue: "@vue/compat",
|
||||||
"@/": `${path.resolve(__dirname, "src")}/`,
|
"@/": `${path.resolve(__dirname, "src")}/`,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user