@rsbuild/plugin-preact 0.3.7 → 0.3.9
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.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var pluginPreact = (options = {}) => ({
|
|
|
30
30
|
pre: [import_core.PLUGIN_SWC_NAME],
|
|
31
31
|
setup(api) {
|
|
32
32
|
const { reactAliasesEnabled = true } = options;
|
|
33
|
-
api.modifyBundlerChain(async (chain, {
|
|
33
|
+
api.modifyBundlerChain(async (chain, { isDev }) => {
|
|
34
34
|
if (reactAliasesEnabled) {
|
|
35
35
|
chain.resolve.alias.merge({
|
|
36
36
|
react: "preact/compat",
|
|
@@ -40,7 +40,7 @@ var pluginPreact = (options = {}) => ({
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
const reactOptions = {
|
|
43
|
-
development:
|
|
43
|
+
development: isDev,
|
|
44
44
|
runtime: "automatic",
|
|
45
45
|
importSource: "preact"
|
|
46
46
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ var pluginPreact = (options = {}) => ({
|
|
|
17
17
|
pre: [PLUGIN_SWC_NAME],
|
|
18
18
|
setup(api) {
|
|
19
19
|
const { reactAliasesEnabled = true } = options;
|
|
20
|
-
api.modifyBundlerChain(async (chain, {
|
|
20
|
+
api.modifyBundlerChain(async (chain, { isDev }) => {
|
|
21
21
|
if (reactAliasesEnabled) {
|
|
22
22
|
chain.resolve.alias.merge({
|
|
23
23
|
react: "preact/compat",
|
|
@@ -27,7 +27,7 @@ var pluginPreact = (options = {}) => ({
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
const reactOptions = {
|
|
30
|
-
development:
|
|
30
|
+
development: isDev,
|
|
31
31
|
runtime: "automatic",
|
|
32
32
|
importSource: "preact"
|
|
33
33
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-preact",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "Preact plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@rsbuild/shared": "0.3.
|
|
25
|
+
"@rsbuild/shared": "0.3.9"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "16.x",
|
|
29
29
|
"typescript": "^5.3.0",
|
|
30
|
-
"@rsbuild/core": "0.3.
|
|
31
|
-
"@scripts/test-helper": "0.3.
|
|
30
|
+
"@rsbuild/core": "0.3.9",
|
|
31
|
+
"@scripts/test-helper": "0.3.9"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@rsbuild/core": "^0.3.
|
|
34
|
+
"@rsbuild/core": "^0.3.9"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public",
|