You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+61-30
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,15 @@
11
11
12
12
**NOTE:**:warning: This `next` branch is development branch for Vue 3! The stable version is now in [`master`](https://github.com/intlify/vue-i18n-loader/tree/master) branch!
@@ -39,6 +41,7 @@ $ npm i --save-dev @intlify/vue-i18n-loader@next
39
41
$ yarn add -D @intlify/vue-i18n-loader@next
40
42
```
41
43
44
+
42
45
## :rocket: i18n resource pre-compilation
43
46
44
47
### Why do we need to require the configuration?
@@ -51,7 +54,7 @@ If you are using the runtime version, you will need to compile before importing
51
54
52
55
You can pre-commpile by configuring vue-i18n-loader as the webpack loader.
53
56
54
-
### Webpack configration
57
+
### webpack configration
55
58
56
59
As an example, if your project has the locale messagess in `src/locales`, your webpack config will look like this:
57
60
@@ -114,9 +117,9 @@ module.exports = {
114
117
The above uses webpack's `Rule.include` to specify the i18n resources to be precompiled. You can also use [`Rule.exclude`](https://webpack.js.org/configuration/module/#ruleexclude) to set the target.
115
118
116
119
117
-
## :rocket:`i18n` custom block
120
+
## :rocket: i18n custom block
118
121
119
-
The below example that`App.vue` have `i18n` custom block:
122
+
The below example that`App.vue` have i18n custom block:
120
123
121
124
### i18n resource definition
122
125
@@ -160,7 +163,7 @@ export default {
160
163
</i18n>
161
164
```
162
165
163
-
The locale messages defined at `i18n` custom blocks are **json format default**.
166
+
The locale messages defined at i18n custom blocks are **json format default**.
164
167
165
168
### i18n resource importing
166
169
@@ -274,7 +277,7 @@ app.use(i18n)
274
277
app.mount('#app')
275
278
```
276
279
277
-
### Webpack Config
280
+
### webpack Config
278
281
279
282
`vue-loader` (`next` version):
280
283
@@ -294,35 +297,63 @@ module.exports = {
294
297
}
295
298
```
296
299
297
-
## :rocket: loader options
298
300
299
-
### forceStringify
301
+
##:wrench: Options
300
302
301
-
Whether pre-compile number and boolean values as message functions that return the string value, default `false`
0 commit comments