@rsbuild/plugin-styled-components 1.0.1-beta.10 → 1.0.1-beta.11
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 +3 -3
- package/dist/index.js +3 -3
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -55,8 +55,8 @@ var pluginStyledComponents = (pluginOptions = {}) => ({
|
|
|
55
55
|
if (api.context.bundlerType === "webpack") {
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
const getMergedOptions = (useSSR) => {
|
|
59
|
-
const isProd =
|
|
58
|
+
const getMergedOptions = (useSSR, config) => {
|
|
59
|
+
const isProd = config.mode === "production";
|
|
60
60
|
return (0, import_reduce_configs.reduceConfigs)({
|
|
61
61
|
initial: getDefaultStyledComponentsConfig(isProd, useSSR),
|
|
62
62
|
config: pluginOptions
|
|
@@ -68,7 +68,7 @@ var pluginStyledComponents = (pluginOptions = {}) => ({
|
|
|
68
68
|
(e) => e.output?.target || userConfig.output?.target || "web"
|
|
69
69
|
) : [userConfig.output?.target || "web"];
|
|
70
70
|
const useSSR = isServerTarget(targets);
|
|
71
|
-
const mergedOptions = getMergedOptions(useSSR);
|
|
71
|
+
const mergedOptions = getMergedOptions(useSSR, userConfig);
|
|
72
72
|
if (!mergedOptions) {
|
|
73
73
|
return userConfig;
|
|
74
74
|
}
|
package/dist/index.js
CHANGED
|
@@ -35,8 +35,8 @@ var pluginStyledComponents = (pluginOptions = {}) => ({
|
|
|
35
35
|
if (api.context.bundlerType === "webpack") {
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
const getMergedOptions = (useSSR) => {
|
|
39
|
-
const isProd =
|
|
38
|
+
const getMergedOptions = (useSSR, config) => {
|
|
39
|
+
const isProd = config.mode === "production";
|
|
40
40
|
return reduceConfigs({
|
|
41
41
|
initial: getDefaultStyledComponentsConfig(isProd, useSSR),
|
|
42
42
|
config: pluginOptions
|
|
@@ -48,7 +48,7 @@ var pluginStyledComponents = (pluginOptions = {}) => ({
|
|
|
48
48
|
(e) => e.output?.target || userConfig.output?.target || "web"
|
|
49
49
|
) : [userConfig.output?.target || "web"];
|
|
50
50
|
const useSSR = isServerTarget(targets);
|
|
51
|
-
const mergedOptions = getMergedOptions(useSSR);
|
|
51
|
+
const mergedOptions = getMergedOptions(useSSR, userConfig);
|
|
52
52
|
if (!mergedOptions) {
|
|
53
53
|
return userConfig;
|
|
54
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-styled-components",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.11",
|
|
4
4
|
"description": "styled-components plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "18.x",
|
|
31
31
|
"typescript": "^5.5.2",
|
|
32
|
-
"@rsbuild/core": "1.0.1-beta.
|
|
32
|
+
"@rsbuild/core": "1.0.1-beta.11"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@rsbuild/core": "^1.0.1-beta.
|
|
35
|
+
"@rsbuild/core": "^1.0.1-beta.11"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public",
|