@lingui/loader 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 +6 -2
- package/dist/index.d.cts +8 -0
- package/dist/index.d.mts +8 -0
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -4,13 +4,17 @@ const path = require('path');
|
|
|
4
4
|
const conf = require('@lingui/conf');
|
|
5
5
|
const api = require('@lingui/cli/api');
|
|
6
6
|
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
8
|
+
|
|
9
|
+
const path__default = /*#__PURE__*/_interopDefaultCompat(path);
|
|
10
|
+
|
|
7
11
|
const loader = async function(source) {
|
|
8
12
|
const options = this.getOptions() || {};
|
|
9
13
|
const config = conf.getConfig({
|
|
10
14
|
configPath: options.config,
|
|
11
|
-
cwd:
|
|
15
|
+
cwd: path__default.dirname(this.resourcePath)
|
|
12
16
|
});
|
|
13
|
-
const catalogRelativePath =
|
|
17
|
+
const catalogRelativePath = path__default.relative(config.rootDir, this.resourcePath);
|
|
14
18
|
const fileCatalog = api.getCatalogForFile(
|
|
15
19
|
catalogRelativePath,
|
|
16
20
|
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/loader",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "webpack loader for lingui message catalogs",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -43,16 +43,16 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@babel/runtime": "^7.20.13",
|
|
46
|
-
"@lingui/cli": "4.
|
|
47
|
-
"@lingui/conf": "4.
|
|
46
|
+
"@lingui/cli": "4.5.0",
|
|
47
|
+
"@lingui/conf": "4.5.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@lingui/format-json": "4.
|
|
51
|
-
"unbuild": "
|
|
50
|
+
"@lingui/format-json": "4.5.0",
|
|
51
|
+
"unbuild": "2.0.0",
|
|
52
52
|
"webpack": "^5.76.1"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"webpack": "^5.0.0"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "62c92d1f8c60b3890bdda870f307fa780d423080"
|
|
58
58
|
}
|