@lingui/vite-plugin 4.4.1 → 4.5.0
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/dist/index.cjs +5 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.mts +10 -0
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -6,6 +6,10 @@ const conf = require('@lingui/conf');
|
|
|
6
6
|
const api = require('@lingui/cli/api');
|
|
7
7
|
const path = require('path');
|
|
8
8
|
|
|
9
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
10
|
+
|
|
11
|
+
const path__default = /*#__PURE__*/_interopDefaultCompat(path);
|
|
12
|
+
|
|
9
13
|
const fileRegex = /(\.po|\?lingui)$/;
|
|
10
14
|
function lingui(linguiConfig = {}) {
|
|
11
15
|
const config = conf.getConfig(linguiConfig);
|
|
@@ -34,7 +38,7 @@ This indicates that you don't have the "babel-plugin-macros" or "@lingui/swc-plu
|
|
|
34
38
|
async transform(src, id) {
|
|
35
39
|
if (fileRegex.test(id)) {
|
|
36
40
|
id = id.split("?")[0];
|
|
37
|
-
const catalogRelativePath =
|
|
41
|
+
const catalogRelativePath = path__default.relative(config.rootDir, id);
|
|
38
42
|
const fileCatalog = api.getCatalogForFile(
|
|
39
43
|
catalogRelativePath,
|
|
40
44
|
await api.getCatalogs(config)
|
package/dist/index.d.cts
ADDED
package/dist/index.d.mts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingui/vite-plugin",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
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": "4.
|
|
43
|
-
"@lingui/conf": "4.
|
|
42
|
+
"@lingui/cli": "4.5.0",
|
|
43
|
+
"@lingui/conf": "4.5.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"vite": "3 - 4"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@lingui/format-json": "^4.
|
|
50
|
-
"@lingui/macro": "^4.
|
|
51
|
-
"unbuild": "
|
|
49
|
+
"@lingui/format-json": "^4.5.0",
|
|
50
|
+
"@lingui/macro": "^4.5.0",
|
|
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": "62c92d1f8c60b3890bdda870f307fa780d423080"
|
|
56
56
|
}
|