@modern-js/plugin-module-import 2.8.1-beta.0 → 2.9.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/CHANGELOG.md +8 -0
- package/dist/cjs/index.js +8 -0
- package/dist/esm/index.js +8 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -41,6 +41,14 @@ var src_default = (options) => ({
|
|
|
41
41
|
const { transformPlugin } = await Promise.resolve().then(() => __toESM(require("@modern-js/libuild-plugin-swc")));
|
|
42
42
|
(_b = config.plugins) == null ? void 0 : _b.push(
|
|
43
43
|
transformPlugin({
|
|
44
|
+
jsc: {
|
|
45
|
+
// swc transform jsx to `React.createElement` in default mode.
|
|
46
|
+
transform: {
|
|
47
|
+
react: {
|
|
48
|
+
runtime: config.jsx === "transform" ? "classic" : "automatic"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
44
52
|
extensions: {
|
|
45
53
|
pluginImport: (_a = options.pluginImport) != null ? _a : []
|
|
46
54
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -9,6 +9,14 @@ var src_default = (options) => ({
|
|
|
9
9
|
const { transformPlugin } = await import("@modern-js/libuild-plugin-swc");
|
|
10
10
|
(_b = config.plugins) == null ? void 0 : _b.push(
|
|
11
11
|
transformPlugin({
|
|
12
|
+
jsc: {
|
|
13
|
+
// swc transform jsx to `React.createElement` in default mode.
|
|
14
|
+
transform: {
|
|
15
|
+
react: {
|
|
16
|
+
runtime: config.jsx === "transform" ? "classic" : "automatic"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
12
20
|
extensions: {
|
|
13
21
|
pluginImport: (_a = options.pluginImport) != null ? _a : []
|
|
14
22
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.9.0",
|
|
15
15
|
"types": "./dist/types/index.d.ts",
|
|
16
16
|
"main": "./dist/cjs/index.js",
|
|
17
17
|
"exports": {
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"typescript": "^4",
|
|
34
34
|
"jest": "^27",
|
|
35
35
|
"@modern-js/libuild": "~0.11.0",
|
|
36
|
-
"@modern-js/module-tools": "2.
|
|
37
|
-
"@scripts/build": "2.
|
|
38
|
-
"@scripts/jest-config": "2.
|
|
36
|
+
"@modern-js/module-tools": "2.9.0",
|
|
37
|
+
"@scripts/build": "2.9.0",
|
|
38
|
+
"@scripts/jest-config": "2.9.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@modern-js/module-tools": "^2.
|
|
41
|
+
"@modern-js/module-tools": "^2.9.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"@modern-js/module-tools": {
|