Skip to content
This repository was archived by the owner on Jul 4, 2021. It is now read-only.

Commit ff052f4

Browse files
authored
feat: support vite 2 (#27)
* feat: support vite 2 * drop node 10
1 parent ab55703 commit ff052f4

File tree

18 files changed

+711
-5991
lines changed

18 files changed

+711
-5991
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest]
17-
node: [10, 12, 14]
17+
node: [12, 14]
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v2

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ the below example that `examples/composition/vite.config.ts`:
3535

3636
```ts
3737
import path from 'path'
38+
import vue from '@vitejs/plugin-vue'
3839
import { pluginI18n } from '@intlify/vite-plugin-vue-i18n'
3940

4041
import type { UserConfig } from 'vite'
4142

4243
const config: UserConfig = {
4344
plugins: [
45+
vue(), // you need to install `@vitejs/plugin-vue`
4446
pluginI18n({
4547
// you need to set i18n resource including paths !
4648
include: path.resolve(__dirname, './path/to/src/locales/**')
@@ -122,12 +124,14 @@ Whether pre-compile number and boolean values as message functions that return t
122124

123125
```ts
124126
import path from 'path'
127+
import vue from '@vitejs/plugin-vue'
125128
import { pluginI18n } from '@intlify/vite-plugin-vue-i18n'
126129

127130
import type { UserConfig } from 'vite'
128131

129132
const config: UserConfig = {
130133
plugins: [
134+
vue(),
131135
pluginI18n({
132136
forceStringify: true,
133137
include: path.resolve(__dirname, './path/to/src/locales/**')

examples/composition/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
"build": "vite build"
88
},
99
"dependencies": {
10-
"vue": "^3.0.4",
11-
"vue-i18n": "^9.0.0-beta.16"
10+
"vue": "^3.0.5",
11+
"vue-i18n": "^9.0.0-beta.18"
1212
},
1313
"devDependencies": {
14-
"vite": "1.0.0-rc.13",
14+
"vite": "2.0.0-beta.3",
15+
"@vitejs/plugin-vue": "^1.0.3",
1516
"@intlify/vite-plugin-vue-i18n": "link:../..",
1617
"typescript": "^4.1.2",
17-
"@vue/compiler-sfc": "^3.0.4"
18+
"@vue/compiler-sfc": "^3.0.5"
1819
}
1920
}

examples/composition/vite.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import path from 'path'
2+
import vue from '@vitejs/plugin-vue'
23
import { pluginI18n } from '@intlify/vite-plugin-vue-i18n'
34

45
import type { UserConfig } from 'vite'
56

67
const config: UserConfig = {
78
plugins: [
9+
vue(),
810
pluginI18n({
911
include: path.resolve(__dirname, './locales/**')
1012
})

0 commit comments

Comments
 (0)