Skip to content

Commit 20e31f8

Browse files
committed
Switch to vue compat
1 parent 426fcd1 commit 20e31f8

4 files changed

Lines changed: 18 additions & 4 deletions

File tree

client/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"@popperjs/core": "^2.11.8",
4545
"@sentry/browser": "^7.74.1",
4646
"@sentry/vue": "^7.114.0",
47+
"@vue/compat": "^3.5.22",
4748
"@vueuse/core": "^10.5.0",
4849
"@vueuse/math": "^10.9.0",
4950
"ace-builds": "^1.39.0",
@@ -115,7 +116,7 @@
115116
"vega": "^5.30.0",
116117
"vega-embed": "^6.26.0",
117118
"vega-lite": "^5.21.0",
118-
"vue": "^2.7.16",
119+
"vue": "^3.5.18",
119120
"vue-class-component": "^7.2.6",
120121
"vue-echarts": "^7.0.3",
121122
"vue-infinite-scroll": "^2.0.2",
@@ -174,6 +175,7 @@
174175
"@vitejs/plugin-vue2": "^2.3.4",
175176
"@vitest/coverage-v8": "^4.0.13",
176177
"@vitest/ui": "^4.0.13",
178+
"@vue/compiler-sfc": "^3.5.22",
177179
"@vue/test-utils": "^1.3.6",
178180
"@vue/tsconfig": "^0.4.0",
179181
"amdi18n-loader": "^0.9.4",
@@ -220,8 +222,8 @@
220222
"vitest": "^4.0.13",
221223
"vitest-fail-on-console": "^0.10.1",
222224
"vitest-location-mock": "^1.0.4",
223-
"vue-loader": "^15.11.1",
224225
"vue-template-compiler": "^2.7.16",
226+
"vue-loader": "^17",
225227
"vue-tsc": "2.2.12",
226228
"webpack": "^5.98.0",
227229
"webpack-cli": "^6.0.1",

client/src/entry/analysis/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
import { configureCompat } from "@vue/compat";
2+
3+
configureCompat({
4+
MODE: 2,
5+
SET: true
6+
});
7+
18
import { createPinia, PiniaVuePlugin } from "pinia";
29
import Vue from "vue";
310

client/src/shim-compat.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
declare module '@vue/compat' {
2+
import { Component, App, Plugin } from 'vue'
3+
export function configureCompat(options: Record<string, any>): void
4+
export * from 'vue'
5+
}

client/webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-env node */
22
const webpack = require("webpack");
33
const path = require("path");
4-
const VueLoaderPlugin = require("vue-loader/lib/plugin");
4+
const { VueLoaderPlugin } = require("vue-loader");
55
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
66
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
77
const { DumpMetaPlugin } = require("dumpmeta-webpack-plugin");
@@ -80,7 +80,7 @@ module.exports = (env = {}, argv = {}) => {
8080
buffer: require.resolve("buffer/"),
8181
},
8282
alias: {
83-
vue$: path.resolve(__dirname, "node_modules/vue/dist/vue.esm.js"),
83+
vue$: path.resolve(__dirname, "node_modules/@vue/compat/dist/vue.esm-bundler.js"),
8484
jquery$: `${libsBase}/jquery.custom.js`,
8585
jqueryVendor$: `${libsBase}/jquery/jquery.js`,
8686
storemodern$: "store/dist/store.modern.js",

0 commit comments

Comments
 (0)