Skip to content

Commit b52fb3d

Browse files
committed
chore: update tsconfig and mount file to Vue 3
Signed-off-by: Maksim Sukharev <[email protected]>
1 parent c5fd35e commit b52fb3d

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

src/index.ts

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,12 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55

6-
import { translate, translatePlural } from '@nextcloud/l10n'
7-
import {
8-
type Pinia,
6+
import type { Pinia } from 'pinia'
97

10-
createPinia,
11-
PiniaVuePlugin,
12-
} from 'pinia'
13-
import Vue from 'vue'
8+
import { createPinia } from 'pinia'
9+
import { createApp } from 'vue'
1410
import App from './App.vue'
1511

16-
Vue.use(PiniaVuePlugin)
17-
Vue.mixin({ methods: { t: translate, n: translatePlural } })
18-
Vue.prototype.t = translate
19-
Vue.prototype.n = translatePlural
20-
2112
const pinia = createPinia()
2213

2314
// ComponentOptions is declared in types/options.d.ts
@@ -27,8 +18,6 @@ declare module 'vue/types/options.d.ts' {
2718
}
2819
}
2920

30-
const mainApp = new Vue({
31-
el: '#logreader-root',
32-
render: (h) => h(App),
33-
pinia,
34-
})
21+
createApp(App)
22+
.use(pinia)
23+
.mount('#logreader-root')

tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,4 @@
1313
"noImplicitAny": true,
1414
"allowSyntheticDefaultImports": true,
1515
},
16-
"vueCompilerOptions": {
17-
"target": 2.7,
18-
},
1916
}

vite.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const config = createAppConfig({
2222
reporter: ['lcov', 'text'],
2323
},
2424
environment: 'happy-dom',
25-
alias: [{ find: /^vue$/, replacement: 'vue/dist/vue.runtime.common.js' }],
2625
},
2726
} as UserConfig,
2827
})

0 commit comments

Comments
 (0)