@rsbuild/plugin-styled-components 0.7.2 → 0.7.4

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 CHANGED
@@ -43,9 +43,9 @@ var pluginStyledComponents = (pluginOptions = {}) => ({
43
43
  const getMergedOptions = () => {
44
44
  const useSSR = (0, import_shared.isServerTarget)(api.context.targets);
45
45
  const isProd = (0, import_shared.getNodeEnv)() === "production";
46
- return (0, import_shared.mergeChainedOptions)({
47
- defaults: getDefaultStyledComponentsConfig(isProd, useSSR),
48
- options: pluginOptions
46
+ return (0, import_shared.reduceConfigs)({
47
+ initial: getDefaultStyledComponentsConfig(isProd, useSSR),
48
+ config: pluginOptions
49
49
  });
50
50
  };
51
51
  api.modifyRsbuildConfig((userConfig, { mergeRsbuildConfig }) => {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ChainedConfig, RsbuildPlugin } from '@rsbuild/core';
1
+ import { ConfigChain, RsbuildPlugin } from '@rsbuild/core';
2
2
 
3
3
  /**
4
4
  * the options of [rspackExperiments.styledComponents](https://rspack.dev/guide/features/builtin-swc-loader#rspackexperimentsstyledcomponents).
@@ -15,6 +15,6 @@ type PluginStyledComponentsOptions = {
15
15
  pure?: boolean;
16
16
  cssProps?: boolean;
17
17
  };
18
- declare const pluginStyledComponents: (pluginOptions?: ChainedConfig<PluginStyledComponentsOptions>) => RsbuildPlugin;
18
+ declare const pluginStyledComponents: (pluginOptions?: ConfigChain<PluginStyledComponentsOptions>) => RsbuildPlugin;
19
19
 
20
20
  export { type PluginStyledComponentsOptions, pluginStyledComponents };
package/dist/index.js CHANGED
@@ -2,16 +2,12 @@ import { createRequire } from 'module';
2
2
  var require = createRequire(import.meta['url']);
3
3
 
4
4
 
5
- // ../../node_modules/.pnpm/@modern-js+module-tools@2.50.0_eslint@9.4.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js
5
+ // ../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.4.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js
6
6
  import { fileURLToPath } from "url";
7
7
  import path from "path";
8
8
 
9
9
  // src/index.ts
10
- import {
11
- getNodeEnv,
12
- isServerTarget,
13
- mergeChainedOptions
14
- } from "@rsbuild/shared";
10
+ import { getNodeEnv, isServerTarget, reduceConfigs } from "@rsbuild/shared";
15
11
  var getDefaultStyledComponentsConfig = (isProd, ssr) => {
16
12
  return {
17
13
  ssr,
@@ -31,9 +27,9 @@ var pluginStyledComponents = (pluginOptions = {}) => ({
31
27
  const getMergedOptions = () => {
32
28
  const useSSR = isServerTarget(api.context.targets);
33
29
  const isProd = getNodeEnv() === "production";
34
- return mergeChainedOptions({
35
- defaults: getDefaultStyledComponentsConfig(isProd, useSSR),
36
- options: pluginOptions
30
+ return reduceConfigs({
31
+ initial: getDefaultStyledComponentsConfig(isProd, useSSR),
32
+ config: pluginOptions
37
33
  });
38
34
  };
39
35
  api.modifyRsbuildConfig((userConfig, { mergeRsbuildConfig }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-styled-components",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "styled-components plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,15 +22,15 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@rsbuild/shared": "0.7.2"
25
+ "@rsbuild/shared": "0.7.4"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "18.x",
29
29
  "typescript": "^5.4.2",
30
- "@rsbuild/core": "0.7.2"
30
+ "@rsbuild/core": "0.7.4"
31
31
  },
32
32
  "peerDependencies": {
33
- "@rsbuild/core": "^0.7.2"
33
+ "@rsbuild/core": "^0.7.4"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public",