@lingui/vite-plugin 5.0.0-next.2 → 5.0.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -31
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -8,38 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
`@lingui/vite-plugin` is part of [LinguiJS][linguijs]. See the [documentation][documentation] for all information, tutorials and examples.
|
|
10
10
|
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
npm install --save-dev @lingui/vite-plugin
|
|
15
|
-
# yarn add --dev @lingui/vite-plugin
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Usage
|
|
19
|
-
|
|
20
|
-
### Via `vite.config.ts`
|
|
21
|
-
|
|
22
|
-
```ts
|
|
23
|
-
import { UserConfig } from 'vite';
|
|
24
|
-
import { lingui } from '@lingui/vite-plugin'
|
|
25
|
-
|
|
26
|
-
const config: UserConfig = {
|
|
27
|
-
plugins: [lingui()]
|
|
28
|
-
}
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Then in Vite-processed code:
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
// *.po files assigned to this loader by default
|
|
35
|
-
const { messages } = await import(`./locales/${language}.po`);
|
|
36
|
-
|
|
37
|
-
// for other extension you have to use `?lingui` suffix
|
|
38
|
-
const { messages } = await import(`./locales/${language}.json?lingui`);
|
|
39
|
-
```
|
|
40
|
-
> See Vite's official documentation for more info about Vite dynamic imports
|
|
41
|
-
> https://vitejs.dev/guide/features.html#dynamic-import
|
|
11
|
+
## Installation & Usage
|
|
42
12
|
|
|
13
|
+
See the [reference][reference] documentation.
|
|
43
14
|
|
|
44
15
|
## License
|
|
45
16
|
|
|
@@ -48,6 +19,7 @@ const { messages } = await import(`./locales/${language}.json?lingui`);
|
|
|
48
19
|
[license]: https://github.com/lingui/js-lingui/blob/main/LICENSE
|
|
49
20
|
[linguijs]: https://github.com/lingui/js-lingui
|
|
50
21
|
[documentation]: https://lingui.dev/
|
|
22
|
+
[reference]: https://lingui.dev/ref/vite-plugin
|
|
51
23
|
[package]: https://www.npmjs.com/package/@lingui/vite-plugin
|
|
52
24
|
[badge-downloads]: https://img.shields.io/npm/dw/@lingui/vite-plugin.svg
|
|
53
25
|
[badge-version]: https://img.shields.io/npm/v/@lingui/vite-plugin.svg
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingui/vite-plugin",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.4",
|
|
4
4
|
"description": "Vite plugin for Lingui message catalogs",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"dist/"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@lingui/cli": "^5.0.0-next.
|
|
43
|
-
"@lingui/conf": "^5.0.0-next.
|
|
42
|
+
"@lingui/cli": "^5.0.0-next.4",
|
|
43
|
+
"@lingui/conf": "^5.0.0-next.4"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"vite": "^3 || ^4 || ^5.0.9"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@lingui/core": "^5.0.0-next.
|
|
50
|
-
"@lingui/format-json": "^5.0.0-next.
|
|
49
|
+
"@lingui/core": "^5.0.0-next.4",
|
|
50
|
+
"@lingui/format-json": "^5.0.0-next.4",
|
|
51
51
|
"unbuild": "2.0.0",
|
|
52
52
|
"vite": "4.1.4",
|
|
53
53
|
"vite-plugin-babel-macros": "^1.0.6"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "7b9ca5b479be4acd58ed95bff841e89efba06279"
|
|
56
56
|
}
|