@rsbuild/plugin-styled-components 1.5.0 → 1.5.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/README.md CHANGED
@@ -79,7 +79,7 @@ type StyledComponentsOptions = {
79
79
  transpileTemplateLiterals?: boolean;
80
80
  minify?: boolean;
81
81
  pure?: boolean;
82
- cssProps?: boolean;
82
+ cssProp?: boolean;
83
83
  };
84
84
  ```
85
85
 
package/dist/index.cjs CHANGED
@@ -27,8 +27,8 @@ var __webpack_require__ = {};
27
27
  var __webpack_exports__ = {};
28
28
  __webpack_require__.r(__webpack_exports__);
29
29
  __webpack_require__.d(__webpack_exports__, {
30
- PLUGIN_STYLED_COMPONENTS_NAME: ()=>PLUGIN_STYLED_COMPONENTS_NAME,
31
- pluginStyledComponents: ()=>pluginStyledComponents
30
+ pluginStyledComponents: ()=>pluginStyledComponents,
31
+ PLUGIN_STYLED_COMPONENTS_NAME: ()=>PLUGIN_STYLED_COMPONENTS_NAME
32
32
  });
33
33
  const external_node_module_namespaceObject = require("node:module");
34
34
  const external_reduce_configs_namespaceObject = require("reduce-configs");
@@ -55,13 +55,9 @@ const pluginStyledComponents = (pluginOptions = {})=>({
55
55
  });
56
56
  };
57
57
  api.modifyEnvironmentConfig((userConfig, { mergeEnvironmentConfig })=>{
58
- var _userConfig_output;
59
58
  const rsbuildConfig = api.getRsbuildConfig();
60
- const targets = rsbuildConfig.environments ? Object.values(rsbuildConfig.environments).map((e)=>{
61
- var _e_output, _userConfig_output;
62
- return (null == (_e_output = e.output) ? void 0 : _e_output.target) || (null == (_userConfig_output = userConfig.output) ? void 0 : _userConfig_output.target) || 'web';
63
- }) : [
64
- (null == (_userConfig_output = userConfig.output) ? void 0 : _userConfig_output.target) || 'web'
59
+ const targets = rsbuildConfig.environments ? Object.values(rsbuildConfig.environments).map((e)=>e.output?.target || userConfig.output?.target || 'web') : [
60
+ userConfig.output?.target || 'web'
65
61
  ];
66
62
  const useSSR = isServerTarget(targets);
67
63
  const mergedOptions = getMergedOptions(useSSR, userConfig);
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ export type PluginStyledComponentsOptions = {
13
13
  transpileTemplateLiterals?: boolean;
14
14
  minify?: boolean;
15
15
  pure?: boolean;
16
- cssProps?: boolean;
16
+ cssProp?: boolean;
17
17
  };
18
18
  export declare const PLUGIN_STYLED_COMPONENTS_NAME = "rsbuild:styled-components";
19
19
  export declare const pluginStyledComponents: (pluginOptions?: ConfigChain<PluginStyledComponentsOptions>) => RsbuildPlugin;
package/dist/index.js CHANGED
@@ -23,13 +23,9 @@ const pluginStyledComponents = (pluginOptions = {})=>({
23
23
  });
24
24
  };
25
25
  api.modifyEnvironmentConfig((userConfig, { mergeEnvironmentConfig })=>{
26
- var _userConfig_output;
27
26
  const rsbuildConfig = api.getRsbuildConfig();
28
- const targets = rsbuildConfig.environments ? Object.values(rsbuildConfig.environments).map((e)=>{
29
- var _e_output, _userConfig_output;
30
- return (null == (_e_output = e.output) ? void 0 : _e_output.target) || (null == (_userConfig_output = userConfig.output) ? void 0 : _userConfig_output.target) || 'web';
31
- }) : [
32
- (null == (_userConfig_output = userConfig.output) ? void 0 : _userConfig_output.target) || 'web'
27
+ const targets = rsbuildConfig.environments ? Object.values(rsbuildConfig.environments).map((e)=>e.output?.target || userConfig.output?.target || 'web') : [
28
+ userConfig.output?.target || 'web'
33
29
  ];
34
30
  const useSSR = isServerTarget(targets);
35
31
  const mergedOptions = getMergedOptions(useSSR, userConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-styled-components",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "repository": "https://github.com/rspack-contrib/rsbuild-plugin-styled-components",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@biomejs/biome": "^1.9.4",
41
- "@playwright/test": "^1.55.1",
41
+ "@playwright/test": "^1.56.1",
42
42
  "@rsbuild/core": "^1.6.0",
43
- "@rslib/core": "^0.15.0",
44
- "@types/node": "^22.18.8",
43
+ "@rslib/core": "^0.17.0",
44
+ "@types/node": "^22.18.13",
45
45
  "nano-staged": "^0.8.0",
46
- "playwright": "^1.55.1",
46
+ "playwright": "^1.56.1",
47
47
  "simple-git-hooks": "^2.13.1",
48
48
  "styled-components": "^6.1.19",
49
49
  "typescript": "^5.9.3"
@@ -56,7 +56,7 @@
56
56
  "optional": true
57
57
  }
58
58
  },
59
- "packageManager": "pnpm@10.17.1",
59
+ "packageManager": "pnpm@10.20.0",
60
60
  "publishConfig": {
61
61
  "access": "public",
62
62
  "registry": "https://registry.npmjs.org/"