@rsbuild/plugin-solid 0.3.6 → 0.3.8
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 +6 -6
package/dist/index.js
CHANGED
|
@@ -42,7 +42,7 @@ function pluginSolid(options = {}) {
|
|
|
42
42
|
name: PLUGIN_SOLID_NAME,
|
|
43
43
|
pre: [import_core.PLUGIN_BABEL_NAME],
|
|
44
44
|
setup(api) {
|
|
45
|
-
api.modifyBundlerChain(async (chain, { CHAIN_ID,
|
|
45
|
+
api.modifyBundlerChain(async (chain, { CHAIN_ID, isDev }) => {
|
|
46
46
|
const rsbuildConfig = api.getNormalizedConfig();
|
|
47
47
|
(0, import_plugin_babel.modifyBabelLoaderOptions)({
|
|
48
48
|
chain,
|
|
@@ -53,7 +53,7 @@ function pluginSolid(options = {}) {
|
|
|
53
53
|
require.resolve("babel-preset-solid"),
|
|
54
54
|
options.solidPresetOptions || {}
|
|
55
55
|
]);
|
|
56
|
-
if (
|
|
56
|
+
if (isDev && rsbuildConfig.dev.hmr) {
|
|
57
57
|
babelOptions.plugins ?? (babelOptions.plugins = []);
|
|
58
58
|
babelOptions.plugins.push([
|
|
59
59
|
require.resolve("solid-refresh/babel")
|
package/dist/index.mjs
CHANGED
|
@@ -22,7 +22,7 @@ function pluginSolid(options = {}) {
|
|
|
22
22
|
name: PLUGIN_SOLID_NAME,
|
|
23
23
|
pre: [PLUGIN_BABEL_NAME],
|
|
24
24
|
setup(api) {
|
|
25
|
-
api.modifyBundlerChain(async (chain, { CHAIN_ID,
|
|
25
|
+
api.modifyBundlerChain(async (chain, { CHAIN_ID, isDev }) => {
|
|
26
26
|
const rsbuildConfig = api.getNormalizedConfig();
|
|
27
27
|
modifyBabelLoaderOptions({
|
|
28
28
|
chain,
|
|
@@ -33,7 +33,7 @@ function pluginSolid(options = {}) {
|
|
|
33
33
|
__require.resolve("babel-preset-solid"),
|
|
34
34
|
options.solidPresetOptions || {}
|
|
35
35
|
]);
|
|
36
|
-
if (
|
|
36
|
+
if (isDev && rsbuildConfig.dev.hmr) {
|
|
37
37
|
babelOptions.plugins ?? (babelOptions.plugins = []);
|
|
38
38
|
babelOptions.plugins.push([
|
|
39
39
|
__require.resolve("solid-refresh/babel")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-solid",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Solid plugin for Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"repository": {
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"babel-preset-solid": "^1.8.6",
|
|
27
27
|
"solid-refresh": "^0.6.0",
|
|
28
|
-
"@rsbuild/plugin-babel": "0.3.
|
|
29
|
-
"@rsbuild/shared": "0.3.
|
|
28
|
+
"@rsbuild/plugin-babel": "0.3.8",
|
|
29
|
+
"@rsbuild/shared": "0.3.8"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/babel__core": "^7.20.3",
|
|
33
33
|
"typescript": "^5.3.0",
|
|
34
|
-
"@rsbuild/core": "0.3.
|
|
35
|
-
"@scripts/test-helper": "0.3.
|
|
34
|
+
"@rsbuild/core": "0.3.8",
|
|
35
|
+
"@scripts/test-helper": "0.3.8"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@rsbuild/core": "^0.3.
|
|
38
|
+
"@rsbuild/core": "^0.3.8"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public",
|