Skip to content

Commit 6d01ba0

Browse files
committed
updates
1 parent 3bcec30 commit 6d01ba0

File tree

6 files changed

+30
-14
lines changed

6 files changed

+30
-14
lines changed

packages/size-check-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"serve": "vite preview"
99
},
1010
"dependencies": {
11-
"@intlify/core": "9.2.0-alpha.6"
11+
"@intlify/core": "9.2.0-alpha.7"
1212
},
1313
"devDependencies": {
1414
"vite": "^2.4.2"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<template>
2+
<h1>{{ t('hello') }}</h1>
3+
</template>
4+
5+
<script lang="ts">
6+
import { defineComponent } from 'vue'
7+
import { useI18n } from 'vue-i18n'
8+
9+
export default defineComponent({
10+
setup() {
11+
const { t } = useI18n()
12+
return { t }
13+
}
14+
})
15+
</script>
Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1-
import { h, createApp } from '@vue/runtime-dom'
2-
import { createI18n, useI18n } from 'petite-vue-i18n'
1+
import { createApp } from '@vue/runtime-dom'
2+
import { createI18n } from 'vue-i18n'
3+
import App from './App.vue'
34

45
const i18n = createI18n({
5-
legacy: false,
6+
// legacy: false,
67
locale: 'en',
78
messages: {
89
en: {
9-
hello: () => 'hello!'
10+
// hello: () => 'hello!'
11+
hello: 'hello!'
1012
}
1113
}
1214
})
1315

14-
const app = createApp({
15-
setup() {
16-
const { t } = useI18n({ useScope: 'global' })
17-
return () => h('div', t('hello world!'))
18-
}
19-
})
16+
const app = createApp(App)
2017
app.use(i18n, { globalInstall: false })
2118
console.log('t', i18n.global.t('hello'))
2219
app.mount('#app')

packages/size-check-petite-vue-i18n/vite.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ export default defineConfig({
2323
},
2424
resolve: {
2525
alias: {
26-
'petite-vue-i18n':
27-
'../petite-vue-i18n/dist/petite-vue-i18n.runtime.esm-bundler.js'
26+
'vue-i18n': 'petite-vue-i18n/dist/petite-vue-i18n.esm-bundler.js'
2827
}
2928
},
3029
plugins: [vue()]

packages/size-check-vue-i18n/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const i18n = createI18n({
1414
const app = createApp({
1515
setup() {
1616
const { t } = useI18n({ useScope: 'global' })
17-
return () => h('div', t('hello world!'))
17+
return () => h('div', t('hello'))
1818
}
1919
})
2020
app.use(i18n, { globalInstall: false })

packages/size-check-vue-i18n/vite.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,10 @@ export default defineConfig({
2121
__INTLIFY_PROD_DEVTOOLS__: false,
2222
'process.env.NODE_ENV': JSON.stringify('production')
2323
},
24+
resolve: {
25+
alias: {
26+
'vue-i18n': 'vue-i18n/dist/vue-i18n.runtime.esm-bundler.js'
27+
}
28+
},
2429
plugins: [vue()]
2530
})

0 commit comments

Comments
 (0)