Skip to content

Commit 55cd664

Browse files
committed
Install vue3 and dependencies
1 parent 0422da1 commit 55cd664

File tree

12 files changed

+509
-528
lines changed

12 files changed

+509
-528
lines changed

package-lock.json

Lines changed: 430 additions & 494 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
"@types/lodash": "^4.14.199",
2020
"@typescript-eslint/eslint-plugin": "^6.7.5",
2121
"@typescript-eslint/parser": "^6.7.5",
22+
"@vue/compiler-sfc": "3.2.0",
2223
"@vue/eslint-config-typescript": "^12.0.0",
23-
"@vue/test-utils": "^1.3.6",
24-
"@vue/vue2-jest": "^29.2.6",
24+
"@vue/test-utils": "^2.0.0",
25+
"@vue/vue3-jest": "^29.2.4",
26+
"@vue/runtime-dom": "3.2.0",
2527
"@wikimedia/codex": "^0.20.0",
2628
"@wikimedia/codex-design-tokens": "^0.20.0",
2729
"@wikimedia/codex-icons": "^0.20.0",
@@ -42,25 +44,30 @@
4244
"ts-jest": "^29.1.0",
4345
"ts-loader": "^9.5.0",
4446
"typescript": "^5.2.2",
45-
"vue-loader": "^15.10.2",
46-
"vue-template-compiler": "^2.6.14"
47+
"vue-loader": "^16.0.0"
4748
},
4849
"dependencies": {
4950
"@inertiajs/inertia": "^0.11.0",
50-
"@inertiajs/inertia-vue": "^0.8.0",
51-
"@vue/composition-api": "^1.7.2",
51+
"@inertiajs/inertia-vue3": "^0.6.0",
52+
"@vue/compat": "3.2.0",
5253
"@wmde/wikit-tokens": "^2.1.0-alpha.15",
5354
"@wmde/wikit-vue-components": "^2.1.0-alpha.16",
5455
"date-fns": "^2.30.0",
5556
"lodash": "^4.17.21",
57+
"pinia": "2.0.36",
5658
"ress": "^5.0.2",
57-
"vue": "^2.6.14",
58-
"vue-banana-i18n": "1.5.0",
59-
"vuex": "^3.6.2"
59+
"vue": "3.2.0",
60+
"vue-banana-i18n": "2.3.0"
6061
},
6162
"overrides": {
63+
"pinia": {
64+
"vue": "3.2.0"
65+
},
6266
"@wikimedia/codex": {
63-
"vue": "^2.6.14"
67+
"vue": "3.2.0"
68+
},
69+
"vue-banana-i18n": {
70+
"banana-i18n": "2.2.0"
6471
}
6572
}
6673
}

public/mix-manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"/images/mismatch-finder-logo.svg": "/images/mismatch-finder-logo.svg",
99
"/images/mismatch-finder-logo_mobile.svg": "/images/mismatch-finder-logo_mobile.svg",
1010
"/images/search.svg": "/images/search.svg",
11-
"/images/user.svg": "/images/user.svg"
11+
"/images/user.svg": "/images/user.svg",
12+
"/images/wikidata-logo.svg": "/images/wikidata-logo.svg"
1213
}

resources/js/Pages/Home.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108

109109
<script lang="ts">
110110
import { mapState, mapMutations } from 'vuex';
111-
import { Head as InertiaHead } from '@inertiajs/inertia-vue';
111+
import { Head as InertiaHead } from '@inertiajs/inertia-vue3';
112112
import {
113113
Button as WikitButton,
114114
Dialog as WikitDialog,

resources/js/Pages/Layout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
<script lang="ts">
7070
import { PropType } from 'vue';
71-
import { Link as InertiaLink } from '@inertiajs/inertia-vue';
71+
import { Link as InertiaLink } from '@inertiajs/inertia-vue3';
7272
import { Link as WikitLink } from '@wmde/wikit-vue-components';
7373
import { Button as LanguageSelectorButton, Icon } from '@wmde/wikit-vue-components';
7474
import AuthWidget from '../Components/AuthWidget.vue';

resources/js/Pages/Playground.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@
263263
</template>
264264

265265
<script lang="ts">
266-
import { Head as InertiaHead } from '@inertiajs/inertia-vue'
267266
import defineComponent from '../types/defineComponent';
267+
import { Head as InertiaHead } from '@inertiajs/inertia-vue3'
268268
269269
import {
270270
Button as WikitButton,

resources/js/Pages/Results.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
import { PropType } from 'vue';
138138
import { mapMutations } from 'vuex';
139139
import isEmpty from 'lodash/isEmpty';
140-
import { Head as InertiaHead } from '@inertiajs/inertia-vue';
140+
import { Head as InertiaHead } from '@inertiajs/inertia-vue3';
141141
import {
142142
Link as WikitLink,
143143
Button as WikitButton,

resources/js/app.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import './bootstrap';
2-
import Vue from 'vue';
32
import i18n from 'vue-banana-i18n';
43
import { createStore } from './store';
5-
import { createInertiaApp } from '@inertiajs/inertia-vue';
6-
74
import i18nMessages from './lib/i18n';
5+
import {createApp, h} from 'vue';
6+
import {createInertiaApp} from '@inertiajs/inertia-vue3';
87
import bubble from './lib/bubble';
98
import Error from './Pages/Error.vue';
109
import Layout from './Pages/Layout.vue';
@@ -33,22 +32,21 @@ async function setupI18n(locale: string): Promise<void>{
3332
return page
3433
},
3534
setup({ el, app, props, plugin }) {
36-
Vue.use(plugin)
37-
new Vue({
38-
render: h => h(app, props),
39-
store
40-
}).$mount(el);
35+
createApp({
36+
render: () => h(app, props)
37+
})
38+
.use(plugin)
39+
.mount(el)
4140
}
4241
});
4342
} catch (e) {
44-
new Vue({
45-
render: h => h(Error, {
43+
createApp({
44+
render: () => h(Error, {
4645
props: {
4746
title: 'Oops!',
4847
description: 'Something unexpected happened, but we are working on it... please try to refresh, or come back later.'
4948
}
5049
}),
51-
}).$mount('#app');
50+
}).mount('#app');
5251
}
5352
})();
54-

resources/js/shims-vue.d.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
declare module "*.vue" {
2-
import Vue from 'vue'
3-
42
module 'vue/types/vue' {
53
interface Vue {
64
$i18n: ( msg: string, ...args: unknown[] ) => string
75
}
86
}
7+
import { defineComponent } from "vue";
8+
const component: ReturnType<typeof defineComponent>;
9+
export default component;
10+
}
911

12+
declare module 'vue' {
13+
import { CompatVue } from '@vue/runtime-dom'
14+
const Vue: CompatVue
1015
export default Vue
16+
export * from '@vue/runtime-dom'
17+
const { configureCompat } = Vue
18+
export { configureCompat }
1119
}
1220

1321
declare module 'vue-banana-i18n';
@@ -17,4 +25,4 @@ declare module '@wikimedia/language-data';
1725
declare module '*.svg' {
1826
const content: any;
1927
export default content;
20-
}
28+
}

resources/sass/app.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@import url('https://tools-static.wmflabs.org/fontcdn/css2?family=Lato&family=Source+Serif+Pro&display=swap');
22

33
@import '~ress';
4-
@import '~@wmde/wikit-vue-components/dist/wikit-vue-components.css';
4+
@import '~wikit-dist/wikit-vue-components-vue3compat.css';
5+
@import "@wikimedia/codex/dist/codex.style.css";
56
@import '~@wmde/wikit-tokens/dist/_variables.scss';
67
@import './_typography.scss';
78

tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"allowJs": true,
66
"strict": true,
77
"esModuleInterop": true,
8-
"moduleResolution": "node"
8+
"moduleResolution": "node",
9+
"noImplicitAny": false,
10+
"strictNullChecks": false
911
},
1012
"include": [
1113
"resources/js"

webpack.mix.js

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const mix = require('laravel-mix');
2-
2+
const path = require('path');
33
/*
44
|--------------------------------------------------------------------------
55
| Mix Asset Management
@@ -12,7 +12,35 @@ const mix = require('laravel-mix');
1212
*/
1313

1414
mix.ts('resources/js/app.ts', 'public/js')
15-
.vue({ version: 2 })
15+
.webpackConfig({
16+
resolve: {
17+
alias: {
18+
vue: '@vue/compat',
19+
'@vue/composition-api': '@vue/compat',
20+
'@wmde/wikit-vue-components':
21+
'@wmde/wikit-vue-components/dist/wikit-vue-components-vue3compat.common.js',
22+
'wikit-dist': path.resolve(__dirname, './node_modules/@wmde/wikit-vue-components/dist'),
23+
}
24+
},
25+
module: {
26+
rules: [
27+
{
28+
test: /\.vue$/,
29+
loader: 'vue-loader',
30+
options: {
31+
compilerOptions: {
32+
compatConfig: {
33+
MODE: 2,
34+
COMPILER_V_ON_NATIVE: true,
35+
COMPILER_V_BIND_SYNC: false
36+
}
37+
}
38+
}
39+
}
40+
]
41+
}
42+
})
43+
.vue({ version: 3})
1644
.sass('resources/sass/app.scss', 'public/css')
1745
.sass('resources/sass/noscript.scss', 'public/css')
1846
.copyDirectory('resources/img', 'public/images')

0 commit comments

Comments
 (0)