@lingui/vite-plugin 4.11.4 → 5.0.0-next.1
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 -3
- package/dist/index.mjs +5 -3
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -18,10 +18,10 @@ function lingui(linguiConfig = {}) {
|
|
|
18
18
|
name: "vite-plugin-lingui-report-macro-error",
|
|
19
19
|
enforce: "pre",
|
|
20
20
|
resolveId(id) {
|
|
21
|
-
if (id.includes("@lingui/macro")) {
|
|
21
|
+
if (id.includes("@lingui/macro") || id.includes("@lingui/core/macro") || id.includes("@lingui/react/macro")) {
|
|
22
22
|
throw new Error(
|
|
23
|
-
`The macro you imported from "
|
|
24
|
-
This indicates that you don't
|
|
23
|
+
`The macro you imported from "${id}" is being executed outside the context of compilation.
|
|
24
|
+
This indicates that you don't configured correctly one of the "babel-plugin-macros" / "@lingui/swc-plugin" / "babel-plugin-lingui-macro"Please see the documentation for how to configure Vite with Lingui correctly: https://lingui.dev/tutorials/setup-vite`
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -34,6 +34,8 @@ This indicates that you don't have the "babel-plugin-macros" or "@lingui/swc-plu
|
|
|
34
34
|
}
|
|
35
35
|
config2.optimizeDeps.exclude = config2.optimizeDeps.exclude || [];
|
|
36
36
|
config2.optimizeDeps.exclude.push("@lingui/macro");
|
|
37
|
+
config2.optimizeDeps.exclude.push("@lingui/core/macro");
|
|
38
|
+
config2.optimizeDeps.exclude.push("@lingui/react/macro");
|
|
37
39
|
},
|
|
38
40
|
async transform(src, id) {
|
|
39
41
|
if (fileRegex.test(id)) {
|
package/dist/index.mjs
CHANGED
|
@@ -10,10 +10,10 @@ function lingui(linguiConfig = {}) {
|
|
|
10
10
|
name: "vite-plugin-lingui-report-macro-error",
|
|
11
11
|
enforce: "pre",
|
|
12
12
|
resolveId(id) {
|
|
13
|
-
if (id.includes("@lingui/macro")) {
|
|
13
|
+
if (id.includes("@lingui/macro") || id.includes("@lingui/core/macro") || id.includes("@lingui/react/macro")) {
|
|
14
14
|
throw new Error(
|
|
15
|
-
`The macro you imported from "
|
|
16
|
-
This indicates that you don't
|
|
15
|
+
`The macro you imported from "${id}" is being executed outside the context of compilation.
|
|
16
|
+
This indicates that you don't configured correctly one of the "babel-plugin-macros" / "@lingui/swc-plugin" / "babel-plugin-lingui-macro"Please see the documentation for how to configure Vite with Lingui correctly: https://lingui.dev/tutorials/setup-vite`
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -26,6 +26,8 @@ This indicates that you don't have the "babel-plugin-macros" or "@lingui/swc-plu
|
|
|
26
26
|
}
|
|
27
27
|
config2.optimizeDeps.exclude = config2.optimizeDeps.exclude || [];
|
|
28
28
|
config2.optimizeDeps.exclude.push("@lingui/macro");
|
|
29
|
+
config2.optimizeDeps.exclude.push("@lingui/core/macro");
|
|
30
|
+
config2.optimizeDeps.exclude.push("@lingui/react/macro");
|
|
29
31
|
},
|
|
30
32
|
async transform(src, id) {
|
|
31
33
|
if (fileRegex.test(id)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingui/vite-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-next.1",
|
|
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": "
|
|
43
|
-
"@lingui/conf": "
|
|
42
|
+
"@lingui/cli": "^5.0.0-next.1",
|
|
43
|
+
"@lingui/conf": "^5.0.0-next.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"vite": "^3 || ^4 || ^5.0.9"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@lingui/
|
|
50
|
-
"@lingui/
|
|
49
|
+
"@lingui/core": "^5.0.0-next.1",
|
|
50
|
+
"@lingui/format-json": "^5.0.0-next.1",
|
|
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": "7936155f7b29ecdc6191042a9a2e363962ab482d"
|
|
56
56
|
}
|