@workleap/rsbuild-configs 3.1.5 → 3.2.0
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/CHANGELOG.md +6 -0
- package/dist/storybook.js +5 -1
- package/dist/storybook.js.map +1 -1
- package/package.json +14 -14
- package/src/storybook.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @workleap/rsbuild-configs
|
|
2
2
|
|
|
3
|
+
## 3.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#343](https://github.com/workleap/wl-web-configs/pull/343) [`de86c49`](https://github.com/workleap/wl-web-configs/commit/de86c499bef3d361bd7623256ecde86ebd39e1ff) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated the Storybook config to disable module concatenation until the Rspack stats feature is fixed. It was preventing Chromatic's Turbosnap from working properly in a monorepo setup. Also bumped the dependencies.
|
|
8
|
+
|
|
3
9
|
## 3.1.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/storybook.js
CHANGED
|
@@ -64,7 +64,11 @@ function defineStorybookConfig(options = {}) {
|
|
|
64
64
|
appendOnly: true,
|
|
65
65
|
level: "verbose",
|
|
66
66
|
debug: /PackFileCache/
|
|
67
|
-
} : undefined
|
|
67
|
+
} : undefined,
|
|
68
|
+
optimization: {
|
|
69
|
+
// Disabling modules concatenation until https://github.com/rstackjs/storybook-rsbuild/issues/403 is fixed.
|
|
70
|
+
concatenateModules: false
|
|
71
|
+
}
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
74
|
};
|
package/dist/storybook.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storybook.js","sources":["../src/storybook.ts"],"sourcesContent":["import { defineConfig, type RsbuildConfig, type RsbuildPlugins, type SourceMap } from \"@rsbuild/core\";\nimport { pluginReact, type PluginReactOptions } from \"@rsbuild/plugin-react\";\nimport { pluginSvgr, type PluginSvgrOptions } from \"@rsbuild/plugin-svgr\";\nimport { applyTransformers, type RsbuildConfigTransformer } from \"./applyTransformers.ts\";\n\nexport type DefineStorybookDefineReactPluginConfigFunction = (defaultOptions: PluginReactOptions) => PluginReactOptions;\nexport type DefineStorybookSvgrPluginConfigFunction = (defaultOptions: PluginSvgrOptions) => PluginSvgrOptions;\n\nexport interface DefineStorybookConfigOptions {\n plugins?: RsbuildPlugins;\n lazyCompilation?: boolean;\n sourceMap?: boolean | SourceMap;\n react?: false | DefineStorybookDefineReactPluginConfigFunction;\n svgr?: false | DefineStorybookSvgrPluginConfigFunction;\n environmentVariables?: Record<string, unknown>;\n transformers?: RsbuildConfigTransformer[];\n verbose?: boolean;\n}\n\nfunction defaultDefineReactPluginConfig(options: PluginReactOptions) {\n return options;\n}\n\nfunction defineSvgrPluginConfig(options: PluginSvgrOptions) {\n return options;\n}\n\nexport function defineStorybookConfig(options: DefineStorybookConfigOptions = {}) {\n const {\n plugins = [],\n lazyCompilation = false,\n sourceMap = {\n js: \"cheap-module-source-map\",\n css: true\n },\n react = defaultDefineReactPluginConfig,\n svgr = defineSvgrPluginConfig,\n // Using an empty object literal as the default value to ensure\n // \"process.env\" is always available.\n environmentVariables = {},\n transformers = [],\n verbose = false\n } = options;\n\n const config: RsbuildConfig = {\n dev: {\n lazyCompilation\n },\n source: {\n // Stringify the environment variables because the plugin does a direct text replacement. Otherwise, \"production\" would become production\n // after replacement and cause an undefined var error because the production var doesn't exist.\n // For more information, view: https://rsbuild.dev/guide/advanced/env-vars#using-define.\n define: {\n \"process.env\": Object.keys(environmentVariables).reduce((acc, key) => {\n acc[key] = JSON.stringify(environmentVariables[key]);\n\n return acc;\n }, {} as Record<string, string>)\n }\n },\n output: {\n target: \"web\",\n minify: false,\n sourceMap\n },\n plugins: [\n react && pluginReact(react({})),\n svgr && pluginSvgr(svgr({\n svgrOptions: {\n exportType: \"named\"\n }\n })),\n ...plugins\n ].filter(Boolean),\n tools: {\n rspack: {\n infrastructureLogging: verbose ? {\n appendOnly: true,\n level: \"verbose\",\n debug: /PackFileCache/\n } : undefined\n }\n }\n };\n\n const transformedConfig = applyTransformers(config, transformers, {\n environment: \"storybook\",\n verbose\n });\n\n return defineConfig(transformedConfig);\n}\n"],"names":["defineConfig","pluginReact","pluginSvgr","applyTransformers","defaultDefineReactPluginConfig","options","defineSvgrPluginConfig","defineStorybookConfig","plugins","lazyCompilation","sourceMap","react","svgr","environmentVariables","transformers","verbose","config","Object","acc","key","JSON","Boolean","undefined","transformedConfig"],"mappings":";;;;;;;;;;;;;;AAAsG;AACzB;AACH;AACgB;AAgB1F,SAASI,+BAA+BC,OAA2B;IAC/D,OAAOA;AACX;AAEA,SAASC,uBAAuBD,OAA0B;IACtD,OAAOA;AACX;AAEO,SAASE,sBAAsBF,UAAwC,CAAC,CAAC;IAC5E,MAAM,EACFG,UAAU,EAAE,EACZC,kBAAkB,KAAK,EACvBC,YAAY;QACR,IAAI;QACJ,KAAK;IACT,CAAC,EACDC,QAAQP,8BAA8B,EACtCQ,OAAON,sBAAsB,EAC7B,+DAA+D;IAC/D,qCAAqC;IACrCO,uBAAuB,CAAC,CAAC,EACzBC,eAAe,EAAE,EACjBC,UAAU,KAAK,EAClB,GAAGV;IAEJ,MAAMW,SAAwB;QAC1B,KAAK;YACDP;QACJ;QACA,QAAQ;YACJ,yIAAyI;YACzI,+FAA+F;YAC/F,wFAAwF;YACxF,QAAQ;gBACJ,eAAeQ,OAAO,IAAI,CAACJ,sBAAsB,MAAM,CAAC,CAACK,KAAKC;oBAC1DD,GAAG,CAACC,IAAI,GAAGC,KAAK,SAAS,CAACP,oBAAoB,CAACM,IAAI;oBAEnD,OAAOD;gBACX,GAAG,CAAC;YACR;QACJ;QACA,QAAQ;YACJ,QAAQ;YACR,QAAQ;YACRR;QACJ;QACA,SAAS;YACLC,SAASV,WAAWA,CAACU,MAAM,CAAC;YAC5BC,QAAQV,UAAUA,CAACU,KAAK;gBACpB,aAAa;oBACT,YAAY;gBAChB;YACJ;eACGJ;SACN,CAAC,MAAM,CAACa;QACT,OAAO;YACH,QAAQ;gBACJ,uBAAuBN,UAAU;oBAC7B,YAAY;oBACZ,OAAO;oBACP,OAAO;gBACX,IAAIO;
|
|
1
|
+
{"version":3,"file":"storybook.js","sources":["../src/storybook.ts"],"sourcesContent":["import { defineConfig, type RsbuildConfig, type RsbuildPlugins, type SourceMap } from \"@rsbuild/core\";\nimport { pluginReact, type PluginReactOptions } from \"@rsbuild/plugin-react\";\nimport { pluginSvgr, type PluginSvgrOptions } from \"@rsbuild/plugin-svgr\";\nimport { applyTransformers, type RsbuildConfigTransformer } from \"./applyTransformers.ts\";\n\nexport type DefineStorybookDefineReactPluginConfigFunction = (defaultOptions: PluginReactOptions) => PluginReactOptions;\nexport type DefineStorybookSvgrPluginConfigFunction = (defaultOptions: PluginSvgrOptions) => PluginSvgrOptions;\n\nexport interface DefineStorybookConfigOptions {\n plugins?: RsbuildPlugins;\n lazyCompilation?: boolean;\n sourceMap?: boolean | SourceMap;\n react?: false | DefineStorybookDefineReactPluginConfigFunction;\n svgr?: false | DefineStorybookSvgrPluginConfigFunction;\n environmentVariables?: Record<string, unknown>;\n transformers?: RsbuildConfigTransformer[];\n verbose?: boolean;\n}\n\nfunction defaultDefineReactPluginConfig(options: PluginReactOptions) {\n return options;\n}\n\nfunction defineSvgrPluginConfig(options: PluginSvgrOptions) {\n return options;\n}\n\nexport function defineStorybookConfig(options: DefineStorybookConfigOptions = {}) {\n const {\n plugins = [],\n lazyCompilation = false,\n sourceMap = {\n js: \"cheap-module-source-map\",\n css: true\n },\n react = defaultDefineReactPluginConfig,\n svgr = defineSvgrPluginConfig,\n // Using an empty object literal as the default value to ensure\n // \"process.env\" is always available.\n environmentVariables = {},\n transformers = [],\n verbose = false\n } = options;\n\n const config: RsbuildConfig = {\n dev: {\n lazyCompilation\n },\n source: {\n // Stringify the environment variables because the plugin does a direct text replacement. Otherwise, \"production\" would become production\n // after replacement and cause an undefined var error because the production var doesn't exist.\n // For more information, view: https://rsbuild.dev/guide/advanced/env-vars#using-define.\n define: {\n \"process.env\": Object.keys(environmentVariables).reduce((acc, key) => {\n acc[key] = JSON.stringify(environmentVariables[key]);\n\n return acc;\n }, {} as Record<string, string>)\n }\n },\n output: {\n target: \"web\",\n minify: false,\n sourceMap\n },\n plugins: [\n react && pluginReact(react({})),\n svgr && pluginSvgr(svgr({\n svgrOptions: {\n exportType: \"named\"\n }\n })),\n ...plugins\n ].filter(Boolean),\n tools: {\n rspack: {\n infrastructureLogging: verbose ? {\n appendOnly: true,\n level: \"verbose\",\n debug: /PackFileCache/\n } : undefined,\n optimization: {\n // Disabling modules concatenation until https://github.com/rstackjs/storybook-rsbuild/issues/403 is fixed.\n concatenateModules: false\n }\n }\n }\n };\n\n const transformedConfig = applyTransformers(config, transformers, {\n environment: \"storybook\",\n verbose\n });\n\n return defineConfig(transformedConfig);\n}\n"],"names":["defineConfig","pluginReact","pluginSvgr","applyTransformers","defaultDefineReactPluginConfig","options","defineSvgrPluginConfig","defineStorybookConfig","plugins","lazyCompilation","sourceMap","react","svgr","environmentVariables","transformers","verbose","config","Object","acc","key","JSON","Boolean","undefined","transformedConfig"],"mappings":";;;;;;;;;;;;;;AAAsG;AACzB;AACH;AACgB;AAgB1F,SAASI,+BAA+BC,OAA2B;IAC/D,OAAOA;AACX;AAEA,SAASC,uBAAuBD,OAA0B;IACtD,OAAOA;AACX;AAEO,SAASE,sBAAsBF,UAAwC,CAAC,CAAC;IAC5E,MAAM,EACFG,UAAU,EAAE,EACZC,kBAAkB,KAAK,EACvBC,YAAY;QACR,IAAI;QACJ,KAAK;IACT,CAAC,EACDC,QAAQP,8BAA8B,EACtCQ,OAAON,sBAAsB,EAC7B,+DAA+D;IAC/D,qCAAqC;IACrCO,uBAAuB,CAAC,CAAC,EACzBC,eAAe,EAAE,EACjBC,UAAU,KAAK,EAClB,GAAGV;IAEJ,MAAMW,SAAwB;QAC1B,KAAK;YACDP;QACJ;QACA,QAAQ;YACJ,yIAAyI;YACzI,+FAA+F;YAC/F,wFAAwF;YACxF,QAAQ;gBACJ,eAAeQ,OAAO,IAAI,CAACJ,sBAAsB,MAAM,CAAC,CAACK,KAAKC;oBAC1DD,GAAG,CAACC,IAAI,GAAGC,KAAK,SAAS,CAACP,oBAAoB,CAACM,IAAI;oBAEnD,OAAOD;gBACX,GAAG,CAAC;YACR;QACJ;QACA,QAAQ;YACJ,QAAQ;YACR,QAAQ;YACRR;QACJ;QACA,SAAS;YACLC,SAASV,WAAWA,CAACU,MAAM,CAAC;YAC5BC,QAAQV,UAAUA,CAACU,KAAK;gBACpB,aAAa;oBACT,YAAY;gBAChB;YACJ;eACGJ;SACN,CAAC,MAAM,CAACa;QACT,OAAO;YACH,QAAQ;gBACJ,uBAAuBN,UAAU;oBAC7B,YAAY;oBACZ,OAAO;oBACP,OAAO;gBACX,IAAIO;gBACJ,cAAc;oBACV,2GAA2G;oBAC3G,oBAAoB;gBACxB;YACJ;QACJ;IACJ;IAEA,MAAMC,oBAAoBpB,iBAAiBA,CAACa,QAAQF,cAAc;QAC9D,aAAa;QACbC;IACJ;IAEA,OAAOf,YAAYA,CAACuB;AACxB"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@workleap/rsbuild-configs",
|
|
3
3
|
"author": "Workleap",
|
|
4
4
|
"description": "Workleap recommended Rsbuild configurations.",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.2.0",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"CHANGELOG.md"
|
|
28
28
|
],
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@rsbuild/core": "^1.
|
|
31
|
-
"@rspack/core": "^1.
|
|
30
|
+
"@rsbuild/core": "^1.7.2",
|
|
31
|
+
"@rspack/core": "^1.7.1"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@rsbuild/plugin-basic-ssl": "^1.2.1",
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"@rsbuild/plugin-svgr": "^1.2.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@eslint/js": "9.39.
|
|
41
|
-
"@rsbuild/core": "1.
|
|
42
|
-
"@rslib/core": "0.
|
|
43
|
-
"@rspack/core": "1.
|
|
44
|
-
"@types/node": "25.0.
|
|
45
|
-
"@typescript-eslint/parser": "8.
|
|
46
|
-
"eslint": "9.39.
|
|
40
|
+
"@eslint/js": "9.39.2",
|
|
41
|
+
"@rsbuild/core": "1.7.2",
|
|
42
|
+
"@rslib/core": "0.19.2",
|
|
43
|
+
"@rspack/core": "1.7.1",
|
|
44
|
+
"@types/node": "25.0.7",
|
|
45
|
+
"@typescript-eslint/parser": "8.53.0",
|
|
46
|
+
"eslint": "9.39.2",
|
|
47
47
|
"typescript": "5.9.3",
|
|
48
|
-
"typescript-eslint": "8.
|
|
49
|
-
"vitest": "4.0.
|
|
50
|
-
"@workleap/eslint-configs": "1.1.
|
|
51
|
-
"@workleap/rslib-configs": "1.1.
|
|
48
|
+
"typescript-eslint": "8.53.0",
|
|
49
|
+
"vitest": "4.0.17",
|
|
50
|
+
"@workleap/eslint-configs": "1.1.9",
|
|
51
|
+
"@workleap/rslib-configs": "1.1.5",
|
|
52
52
|
"@workleap/typescript-configs": "3.0.7"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
package/src/storybook.ts
CHANGED
|
@@ -78,7 +78,11 @@ export function defineStorybookConfig(options: DefineStorybookConfigOptions = {}
|
|
|
78
78
|
appendOnly: true,
|
|
79
79
|
level: "verbose",
|
|
80
80
|
debug: /PackFileCache/
|
|
81
|
-
} : undefined
|
|
81
|
+
} : undefined,
|
|
82
|
+
optimization: {
|
|
83
|
+
// Disabling modules concatenation until https://github.com/rstackjs/storybook-rsbuild/issues/403 is fixed.
|
|
84
|
+
concatenateModules: false
|
|
85
|
+
}
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
};
|