@workleap/rslib-configs 1.1.8 → 1.1.9
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/applyTransformers.js +0 -2
- package/dist/applyTransformers.js.map +1 -1
- package/dist/assertions.js +0 -2
- package/dist/assertions.js.map +1 -1
- package/dist/build.js +0 -6
- package/dist/build.js.map +1 -1
- package/dist/dev.js +0 -6
- package/dist/dev.js.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/storybook.js +0 -5
- package/dist/storybook.js.map +1 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @workleap/rslib-configs
|
|
2
2
|
|
|
3
|
+
## 1.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#405](https://github.com/workleap/wl-web-configs/pull/405) [`4f089fa`](https://github.com/workleap/wl-web-configs/commit/4f089faef6e643c344c9ba2c2b871489155f224f) Thanks [@claude](https://github.com/apps/claude)! - Updated dependencies to their latest versions.
|
|
8
|
+
|
|
3
9
|
## 1.1.8
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyTransformers.js","sources":["../src/applyTransformers.ts"],"sourcesContent":["import type { RslibConfig } from \"@rslib/core\";\n\nexport interface RslibConfigTransformerContext {\n environment: \"dev\" | \"build\" | \"storybook\";\n}\n\nexport type RslibConfigTransformer = (config: RslibConfig, context: RslibConfigTransformerContext) => RslibConfig;\n\nexport function applyTransformers(config: RslibConfig, transformers: RslibConfigTransformer[], context: RslibConfigTransformerContext) {\n return transformers.reduce((acc, transformer) => transformer(acc, context), config);\n}\n"],"names":["applyTransformers","config","transformers","context","acc","transformer"],"mappings":"
|
|
1
|
+
{"version":3,"file":"applyTransformers.js","sources":["../src/applyTransformers.ts"],"sourcesContent":["import type { RslibConfig } from \"@rslib/core\";\n\nexport interface RslibConfigTransformerContext {\n environment: \"dev\" | \"build\" | \"storybook\";\n}\n\nexport type RslibConfigTransformer = (config: RslibConfig, context: RslibConfigTransformerContext) => RslibConfig;\n\nexport function applyTransformers(config: RslibConfig, transformers: RslibConfigTransformer[], context: RslibConfigTransformerContext) {\n return transformers.reduce((acc, transformer) => transformer(acc, context), config);\n}\n"],"names":["applyTransformers","config","transformers","context","acc","transformer"],"mappings":"AAQO,SAASA,iBAAiBA,CAACC,MAAmB,EAAEC,YAAsC,EAAEC,OAAsC;IACjI,OAAOD,aAAa,MAAM,CAAC,CAACE,KAAKC,cAAgBA,YAAYD,KAAKD,UAAUF;AAChF"}
|
package/dist/assertions.js
CHANGED
package/dist/assertions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertions.js","sources":["../src/assertions.ts"],"sourcesContent":["// Using \"unknown\" loses the typings.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isFunction(value: unknown): value is (...args: any[]) => any {\n return typeof value === \"function\";\n}\n"],"names":["isFunction","value"],"mappings":"
|
|
1
|
+
{"version":3,"file":"assertions.js","sources":["../src/assertions.ts"],"sourcesContent":["// Using \"unknown\" loses the typings.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isFunction(value: unknown): value is (...args: any[]) => any {\n return typeof value === \"function\";\n}\n"],"names":["isFunction","value"],"mappings":"AAAA,qCAAqC;AACrC,8DAA8D;AACvD,SAASA,UAAUA,CAACC,KAAc;IACrC,OAAO,OAAOA,UAAU;AAC5B"}
|
package/dist/build.js
CHANGED
|
@@ -4,17 +4,11 @@ import { defineConfig } from "@rslib/core";
|
|
|
4
4
|
import { applyTransformers } from "./applyTransformers.js";
|
|
5
5
|
import { isFunction } from "./assertions.js";
|
|
6
6
|
|
|
7
|
-
;// CONCATENATED MODULE: external "@rsbuild/plugin-react"
|
|
8
7
|
|
|
9
|
-
;// CONCATENATED MODULE: external "@rsbuild/plugin-svgr"
|
|
10
8
|
|
|
11
|
-
;// CONCATENATED MODULE: external "@rslib/core"
|
|
12
9
|
|
|
13
|
-
;// CONCATENATED MODULE: external "./applyTransformers.js"
|
|
14
10
|
|
|
15
|
-
;// CONCATENATED MODULE: external "./assertions.js"
|
|
16
11
|
|
|
17
|
-
;// CONCATENATED MODULE: ./src/build.ts
|
|
18
12
|
|
|
19
13
|
|
|
20
14
|
|
package/dist/build.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sources":["../src/build.ts"],"sourcesContent":["import { pluginReact, type PluginReactOptions } from \"@rsbuild/plugin-react\";\nimport { pluginSvgr, type PluginSvgrOptions } from \"@rsbuild/plugin-svgr\";\nimport { defineConfig, type Dts, type Rsbuild, type Syntax } from \"@rslib/core\";\nimport { applyTransformers, type RslibConfigTransformer } from \"./applyTransformers.ts\";\nimport { isFunction } from \"./assertions.ts\";\n\nexport type DefineBuildDefineReactPluginConfigFunction = (defaultOptions: PluginReactOptions) => PluginReactOptions;\nexport type DefineBuildSvgrPluginConfigFunction = (defaultOptions: PluginSvgrOptions) => PluginSvgrOptions;\n\nexport interface DefineBuildConfigOptions {\n entry?: Rsbuild.RsbuildEntry;\n syntax?: Syntax;\n bundle?: boolean;\n tsconfigPath?: string;\n dts?: Dts;\n target?: Rsbuild.RsbuildTarget;\n distPath?: Rsbuild.DistPathConfig;\n plugins?: Rsbuild.RsbuildPlugins;\n sourceMap?: boolean | Rsbuild.SourceMap;\n react?: true | DefineBuildDefineReactPluginConfigFunction;\n svgr?: true | DefineBuildSvgrPluginConfigFunction;\n transformers?: RslibConfigTransformer[];\n}\n\nexport function defineBuildConfig(options: DefineBuildConfigOptions = {}) {\n const {\n entry: entryValue,\n syntax = \"esnext\",\n bundle = false,\n tsconfigPath,\n dts = true,\n target = \"web\",\n distPath = {\n root: \"./dist\"\n },\n plugins = [],\n sourceMap = {\n js: \"source-map\",\n css: true\n },\n react = false,\n svgr = false,\n transformers = []\n } = options;\n\n if (!bundle && !tsconfigPath) {\n throw new Error(\"[rslib-configs] When the \\\"bundle\\\" option is \\\"false\\\", a \\\"tsconfigPath\\\" option must be provided. We recommend including a tsconfig.build.json file specifically for compiling the library project.\");\n }\n\n let entry = entryValue;\n\n if (!entry) {\n entry = {\n index: bundle ? [\"./src/index.ts\", \"./src/index.js\"] : \"./src/**\"\n };\n }\n\n const svgrDefaultOptions: PluginSvgrOptions = {\n svgrOptions: {\n exportType: \"named\"\n }\n };\n\n const config = defineConfig({\n mode: \"production\",\n lib: [{\n format: \"esm\",\n syntax,\n bundle,\n dts\n }],\n source: {\n entry,\n tsconfigPath\n },\n output: {\n target,\n distPath,\n cleanDistPath: true,\n minify: false,\n sourceMap\n },\n plugins: ([\n react && pluginReact(isFunction(react) ? react({}) : {}),\n svgr && pluginSvgr(isFunction(svgr) ? svgr(svgrDefaultOptions) : svgrDefaultOptions),\n ...plugins\n ] as Rsbuild.RsbuildPlugins).filter(Boolean)\n });\n\n const transformedConfig = applyTransformers(config, transformers, {\n environment: \"build\"\n });\n\n return defineConfig(transformedConfig);\n}\n"],"names":["pluginReact","pluginSvgr","defineConfig","applyTransformers","isFunction","defineBuildConfig","options","entryValue","syntax","bundle","tsconfigPath","dts","target","distPath","plugins","sourceMap","react","svgr","transformers","Error","entry","svgrDefaultOptions","config","Boolean","transformedConfig"],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.js","sources":["../src/build.ts"],"sourcesContent":["import { pluginReact, type PluginReactOptions } from \"@rsbuild/plugin-react\";\nimport { pluginSvgr, type PluginSvgrOptions } from \"@rsbuild/plugin-svgr\";\nimport { defineConfig, type Dts, type Rsbuild, type Syntax } from \"@rslib/core\";\nimport { applyTransformers, type RslibConfigTransformer } from \"./applyTransformers.ts\";\nimport { isFunction } from \"./assertions.ts\";\n\nexport type DefineBuildDefineReactPluginConfigFunction = (defaultOptions: PluginReactOptions) => PluginReactOptions;\nexport type DefineBuildSvgrPluginConfigFunction = (defaultOptions: PluginSvgrOptions) => PluginSvgrOptions;\n\nexport interface DefineBuildConfigOptions {\n entry?: Rsbuild.RsbuildEntry;\n syntax?: Syntax;\n bundle?: boolean;\n tsconfigPath?: string;\n dts?: Dts;\n target?: Rsbuild.RsbuildTarget;\n distPath?: Rsbuild.DistPathConfig;\n plugins?: Rsbuild.RsbuildPlugins;\n sourceMap?: boolean | Rsbuild.SourceMap;\n react?: true | DefineBuildDefineReactPluginConfigFunction;\n svgr?: true | DefineBuildSvgrPluginConfigFunction;\n transformers?: RslibConfigTransformer[];\n}\n\nexport function defineBuildConfig(options: DefineBuildConfigOptions = {}) {\n const {\n entry: entryValue,\n syntax = \"esnext\",\n bundle = false,\n tsconfigPath,\n dts = true,\n target = \"web\",\n distPath = {\n root: \"./dist\"\n },\n plugins = [],\n sourceMap = {\n js: \"source-map\",\n css: true\n },\n react = false,\n svgr = false,\n transformers = []\n } = options;\n\n if (!bundle && !tsconfigPath) {\n throw new Error(\"[rslib-configs] When the \\\"bundle\\\" option is \\\"false\\\", a \\\"tsconfigPath\\\" option must be provided. We recommend including a tsconfig.build.json file specifically for compiling the library project.\");\n }\n\n let entry = entryValue;\n\n if (!entry) {\n entry = {\n index: bundle ? [\"./src/index.ts\", \"./src/index.js\"] : \"./src/**\"\n };\n }\n\n const svgrDefaultOptions: PluginSvgrOptions = {\n svgrOptions: {\n exportType: \"named\"\n }\n };\n\n const config = defineConfig({\n mode: \"production\",\n lib: [{\n format: \"esm\",\n syntax,\n bundle,\n dts\n }],\n source: {\n entry,\n tsconfigPath\n },\n output: {\n target,\n distPath,\n cleanDistPath: true,\n minify: false,\n sourceMap\n },\n plugins: ([\n react && pluginReact(isFunction(react) ? react({}) : {}),\n svgr && pluginSvgr(isFunction(svgr) ? svgr(svgrDefaultOptions) : svgrDefaultOptions),\n ...plugins\n ] as Rsbuild.RsbuildPlugins).filter(Boolean)\n });\n\n const transformedConfig = applyTransformers(config, transformers, {\n environment: \"build\"\n });\n\n return defineConfig(transformedConfig);\n}\n"],"names":["pluginReact","pluginSvgr","defineConfig","applyTransformers","isFunction","defineBuildConfig","options","entryValue","syntax","bundle","tsconfigPath","dts","target","distPath","plugins","sourceMap","react","svgr","transformers","Error","entry","svgrDefaultOptions","config","Boolean","transformedConfig"],"mappings":";;;;;;;;;;;AAA6E;AACH;AACM;AACQ;AAC3C;AAoBtC,SAASK,iBAAiBA,CAACC,UAAoC,CAAC,CAAC;IACpE,MAAM,EACF,OAAOC,UAAU,EACjBC,SAAS,QAAQ,EACjBC,SAAS,KAAK,EACdC,YAAY,EACZC,MAAM,IAAI,EACVC,SAAS,KAAK,EACdC,WAAW;QACP,MAAM;IACV,CAAC,EACDC,UAAU,EAAE,EACZC,YAAY;QACR,IAAI;QACJ,KAAK;IACT,CAAC,EACDC,QAAQ,KAAK,EACbC,OAAO,KAAK,EACZC,eAAe,EAAE,EACpB,GAAGZ;IAEJ,IAAI,CAACG,UAAU,CAACC,cAAc;QAC1B,MAAM,IAAIS,MAAM;IACpB;IAEA,IAAIC,QAAQb;IAEZ,IAAI,CAACa,OAAO;QACRA,QAAQ;YACJ,OAAOX,SAAS;gBAAC;gBAAkB;aAAiB,GAAG;QAC3D;IACJ;IAEA,MAAMY,qBAAwC;QAC1C,aAAa;YACT,YAAY;QAChB;IACJ;IAEA,MAAMC,SAASpB,YAAYA,CAAC;QACxB,MAAM;QACN,KAAK;YAAC;gBACF,QAAQ;gBACRM;gBACAC;gBACAE;YACJ;SAAE;QACF,QAAQ;YACJS;YACAV;QACJ;QACA,QAAQ;YACJE;YACAC;YACA,eAAe;YACf,QAAQ;YACRE;QACJ;QACA,SAAU;YACNC,SAAShB,WAAWA,CAACI,UAAUA,CAACY,SAASA,MAAM,CAAC,KAAK,CAAC;YACtDC,QAAQhB,UAAUA,CAACG,UAAUA,CAACa,QAAQA,KAAKI,sBAAsBA;eAC9DP;SACN,CAA4B,MAAM,CAACS;IACxC;IAEA,MAAMC,oBAAoBrB,iBAAiBA,CAACmB,QAAQJ,cAAc;QAC9D,aAAa;IACjB;IAEA,OAAOhB,YAAYA,CAACsB;AACxB"}
|
package/dist/dev.js
CHANGED
|
@@ -4,17 +4,11 @@ import { defineConfig } from "@rslib/core";
|
|
|
4
4
|
import { applyTransformers } from "./applyTransformers.js";
|
|
5
5
|
import { isFunction } from "./assertions.js";
|
|
6
6
|
|
|
7
|
-
;// CONCATENATED MODULE: external "@rsbuild/plugin-react"
|
|
8
7
|
|
|
9
|
-
;// CONCATENATED MODULE: external "@rsbuild/plugin-svgr"
|
|
10
8
|
|
|
11
|
-
;// CONCATENATED MODULE: external "@rslib/core"
|
|
12
9
|
|
|
13
|
-
;// CONCATENATED MODULE: external "./applyTransformers.js"
|
|
14
10
|
|
|
15
|
-
;// CONCATENATED MODULE: external "./assertions.js"
|
|
16
11
|
|
|
17
|
-
;// CONCATENATED MODULE: ./src/dev.ts
|
|
18
12
|
|
|
19
13
|
|
|
20
14
|
|
package/dist/dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sources":["../src/dev.ts"],"sourcesContent":["import { pluginReact, type PluginReactOptions } from \"@rsbuild/plugin-react\";\nimport { pluginSvgr, type PluginSvgrOptions } from \"@rsbuild/plugin-svgr\";\nimport { defineConfig, type Dts, type Rsbuild, type Syntax } from \"@rslib/core\";\nimport { applyTransformers, type RslibConfigTransformer } from \"./applyTransformers.ts\";\nimport { isFunction } from \"./assertions.ts\";\n\nexport type DefineDevDefineReactPluginConfigFunction = (defaultOptions: PluginReactOptions) => PluginReactOptions;\nexport type DefineDevSvgrPluginConfigFunction = (defaultOptions: PluginSvgrOptions) => PluginSvgrOptions;\n\nexport interface DefineDevConfigOptions {\n entry?: Rsbuild.RsbuildEntry;\n syntax?: Syntax;\n bundle?: boolean;\n tsconfigPath?: string;\n dts?: Dts;\n target?: Rsbuild.RsbuildTarget;\n distPath?: Rsbuild.DistPathConfig;\n plugins?: Rsbuild.RsbuildPlugins;\n sourceMap?: boolean | Rsbuild.SourceMap;\n react?: true | DefineDevDefineReactPluginConfigFunction;\n svgr?: true | DefineDevSvgrPluginConfigFunction;\n transformers?: RslibConfigTransformer[];\n}\n\nexport function defineDevConfig(options: DefineDevConfigOptions = {}) {\n const {\n entry: entryValue,\n syntax = \"esnext\",\n bundle = false,\n tsconfigPath,\n dts = false,\n target = \"web\",\n distPath = {\n root: \"./dist\"\n },\n plugins = [],\n sourceMap = {\n js: \"cheap-module-source-map\",\n css: true\n },\n react = false,\n svgr = false,\n transformers = []\n } = options;\n\n if (!bundle && !tsconfigPath) {\n throw new Error(\"[rslib-configs] When the \\\"bundle\\\" option is \\\"false\\\", a \\\"tsconfigPath\\\" option must be provided. We recommend including a tsconfig.build.json file specifically for compiling the library project.\");\n }\n\n let entry = entryValue;\n\n if (!entry) {\n entry = {\n index: bundle ? [\"./src/index.ts\", \"./src/index.js\"] : \"./src/**\"\n };\n }\n\n const svgrDefaultOptions: PluginSvgrOptions = {\n svgrOptions: {\n exportType: \"named\"\n }\n };\n\n const config = defineConfig({\n mode: \"development\",\n lib: [{\n format: \"esm\",\n syntax,\n bundle,\n dts\n }],\n source: {\n entry,\n tsconfigPath\n },\n output: {\n target,\n distPath,\n cleanDistPath: true,\n minify: false,\n sourceMap\n },\n plugins: ([\n react && pluginReact(isFunction(react) ? react({}) : {}),\n svgr && pluginSvgr(isFunction(svgr) ? svgr(svgrDefaultOptions) : svgrDefaultOptions),\n ...plugins\n ] as Rsbuild.RsbuildPlugins).filter(Boolean)\n });\n\n const transformedConfig = applyTransformers(config, transformers, {\n environment: \"dev\"\n });\n\n return defineConfig(transformedConfig);\n}\n"],"names":["pluginReact","pluginSvgr","defineConfig","applyTransformers","isFunction","defineDevConfig","options","entryValue","syntax","bundle","tsconfigPath","dts","target","distPath","plugins","sourceMap","react","svgr","transformers","Error","entry","svgrDefaultOptions","config","Boolean","transformedConfig"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev.js","sources":["../src/dev.ts"],"sourcesContent":["import { pluginReact, type PluginReactOptions } from \"@rsbuild/plugin-react\";\nimport { pluginSvgr, type PluginSvgrOptions } from \"@rsbuild/plugin-svgr\";\nimport { defineConfig, type Dts, type Rsbuild, type Syntax } from \"@rslib/core\";\nimport { applyTransformers, type RslibConfigTransformer } from \"./applyTransformers.ts\";\nimport { isFunction } from \"./assertions.ts\";\n\nexport type DefineDevDefineReactPluginConfigFunction = (defaultOptions: PluginReactOptions) => PluginReactOptions;\nexport type DefineDevSvgrPluginConfigFunction = (defaultOptions: PluginSvgrOptions) => PluginSvgrOptions;\n\nexport interface DefineDevConfigOptions {\n entry?: Rsbuild.RsbuildEntry;\n syntax?: Syntax;\n bundle?: boolean;\n tsconfigPath?: string;\n dts?: Dts;\n target?: Rsbuild.RsbuildTarget;\n distPath?: Rsbuild.DistPathConfig;\n plugins?: Rsbuild.RsbuildPlugins;\n sourceMap?: boolean | Rsbuild.SourceMap;\n react?: true | DefineDevDefineReactPluginConfigFunction;\n svgr?: true | DefineDevSvgrPluginConfigFunction;\n transformers?: RslibConfigTransformer[];\n}\n\nexport function defineDevConfig(options: DefineDevConfigOptions = {}) {\n const {\n entry: entryValue,\n syntax = \"esnext\",\n bundle = false,\n tsconfigPath,\n dts = false,\n target = \"web\",\n distPath = {\n root: \"./dist\"\n },\n plugins = [],\n sourceMap = {\n js: \"cheap-module-source-map\",\n css: true\n },\n react = false,\n svgr = false,\n transformers = []\n } = options;\n\n if (!bundle && !tsconfigPath) {\n throw new Error(\"[rslib-configs] When the \\\"bundle\\\" option is \\\"false\\\", a \\\"tsconfigPath\\\" option must be provided. We recommend including a tsconfig.build.json file specifically for compiling the library project.\");\n }\n\n let entry = entryValue;\n\n if (!entry) {\n entry = {\n index: bundle ? [\"./src/index.ts\", \"./src/index.js\"] : \"./src/**\"\n };\n }\n\n const svgrDefaultOptions: PluginSvgrOptions = {\n svgrOptions: {\n exportType: \"named\"\n }\n };\n\n const config = defineConfig({\n mode: \"development\",\n lib: [{\n format: \"esm\",\n syntax,\n bundle,\n dts\n }],\n source: {\n entry,\n tsconfigPath\n },\n output: {\n target,\n distPath,\n cleanDistPath: true,\n minify: false,\n sourceMap\n },\n plugins: ([\n react && pluginReact(isFunction(react) ? react({}) : {}),\n svgr && pluginSvgr(isFunction(svgr) ? svgr(svgrDefaultOptions) : svgrDefaultOptions),\n ...plugins\n ] as Rsbuild.RsbuildPlugins).filter(Boolean)\n });\n\n const transformedConfig = applyTransformers(config, transformers, {\n environment: \"dev\"\n });\n\n return defineConfig(transformedConfig);\n}\n"],"names":["pluginReact","pluginSvgr","defineConfig","applyTransformers","isFunction","defineDevConfig","options","entryValue","syntax","bundle","tsconfigPath","dts","target","distPath","plugins","sourceMap","react","svgr","transformers","Error","entry","svgrDefaultOptions","config","Boolean","transformedConfig"],"mappings":";;;;;;;;;;;AAA6E;AACH;AACM;AACQ;AAC3C;AAoBtC,SAASK,eAAeA,CAACC,UAAkC,CAAC,CAAC;IAChE,MAAM,EACF,OAAOC,UAAU,EACjBC,SAAS,QAAQ,EACjBC,SAAS,KAAK,EACdC,YAAY,EACZC,MAAM,KAAK,EACXC,SAAS,KAAK,EACdC,WAAW;QACP,MAAM;IACV,CAAC,EACDC,UAAU,EAAE,EACZC,YAAY;QACR,IAAI;QACJ,KAAK;IACT,CAAC,EACDC,QAAQ,KAAK,EACbC,OAAO,KAAK,EACZC,eAAe,EAAE,EACpB,GAAGZ;IAEJ,IAAI,CAACG,UAAU,CAACC,cAAc;QAC1B,MAAM,IAAIS,MAAM;IACpB;IAEA,IAAIC,QAAQb;IAEZ,IAAI,CAACa,OAAO;QACRA,QAAQ;YACJ,OAAOX,SAAS;gBAAC;gBAAkB;aAAiB,GAAG;QAC3D;IACJ;IAEA,MAAMY,qBAAwC;QAC1C,aAAa;YACT,YAAY;QAChB;IACJ;IAEA,MAAMC,SAASpB,YAAYA,CAAC;QACxB,MAAM;QACN,KAAK;YAAC;gBACF,QAAQ;gBACRM;gBACAC;gBACAE;YACJ;SAAE;QACF,QAAQ;YACJS;YACAV;QACJ;QACA,QAAQ;YACJE;YACAC;YACA,eAAe;YACf,QAAQ;YACRE;QACJ;QACA,SAAU;YACNC,SAAShB,WAAWA,CAACI,UAAUA,CAACY,SAASA,MAAM,CAAC,KAAK,CAAC;YACtDC,QAAQhB,UAAUA,CAACG,UAAUA,CAACa,QAAQA,KAAKI,sBAAsBA;eAC9DP;SACN,CAA4B,MAAM,CAACS;IACxC;IAEA,MAAMC,oBAAoBrB,iBAAiBA,CAACmB,QAAQJ,cAAc;QAC9D,aAAa;IACjB;IAEA,OAAOhB,YAAYA,CAACsB;AACxB"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["export type { RslibConfigTransformer, RslibConfigTransformerContext } from \"./applyTransformers.ts\";\nexport * from \"./build.ts\";\nexport * from \"./dev.ts\";\nexport * from \"./storybook.ts\";\n\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["export type { RslibConfigTransformer, RslibConfigTransformerContext } from \"./applyTransformers.ts\";\nexport * from \"./build.ts\";\nexport * from \"./dev.ts\";\nexport * from \"./storybook.ts\";\n\n"],"names":[],"mappings":";;;AAC2B;AACF;AACM"}
|
package/dist/storybook.js
CHANGED
|
@@ -3,15 +3,10 @@ import { pluginSvgr } from "@rsbuild/plugin-svgr";
|
|
|
3
3
|
import { defineConfig } from "@rslib/core";
|
|
4
4
|
import { applyTransformers } from "./applyTransformers.js";
|
|
5
5
|
|
|
6
|
-
;// CONCATENATED MODULE: external "@rsbuild/plugin-react"
|
|
7
6
|
|
|
8
|
-
;// CONCATENATED MODULE: external "@rsbuild/plugin-svgr"
|
|
9
7
|
|
|
10
|
-
;// CONCATENATED MODULE: external "@rslib/core"
|
|
11
8
|
|
|
12
|
-
;// CONCATENATED MODULE: external "./applyTransformers.js"
|
|
13
9
|
|
|
14
|
-
;// CONCATENATED MODULE: ./src/storybook.ts
|
|
15
10
|
|
|
16
11
|
|
|
17
12
|
|
package/dist/storybook.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storybook.js","sources":["../src/storybook.ts"],"sourcesContent":["import { pluginReact, type PluginReactOptions } from \"@rsbuild/plugin-react\";\nimport { pluginSvgr, type PluginSvgrOptions } from \"@rsbuild/plugin-svgr\";\nimport { defineConfig, type Rsbuild } from \"@rslib/core\";\nimport { applyTransformers, type RslibConfigTransformer } from \"./applyTransformers.ts\";\n\nexport type DefineStorybookDefineReactPluginConfigFunction = (defaultOptions: PluginReactOptions) => PluginReactOptions;\nexport type DefineStorybookSvgrPluginConfigFunction = (defaultOptions: PluginSvgrOptions) => PluginSvgrOptions;\n\nexport interface DefineStorybookConfigOptions {\n plugins?: Rsbuild.RsbuildPlugins;\n sourceMap?: boolean | Rsbuild.SourceMap;\n react?: false | DefineStorybookDefineReactPluginConfigFunction;\n svgr?: false | DefineStorybookSvgrPluginConfigFunction;\n transformers?: RslibConfigTransformer[];\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 sourceMap = {\n js: \"cheap-module-source-map\",\n css: true\n },\n react = defaultDefineReactPluginConfig,\n svgr = defineSvgrPluginConfig,\n transformers = []\n } = options;\n\n const config = defineConfig({\n lib: [{\n dts: false\n }],\n output: {\n target: \"web\",\n // Setting the clean option to true breaks the Storybook integration.\n cleanDistPath: false,\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 ]\n });\n\n const transformedConfig = applyTransformers(config, transformers, {\n environment: \"storybook\"\n });\n\n return defineConfig(transformedConfig);\n}\n"],"names":["pluginReact","pluginSvgr","defineConfig","applyTransformers","defaultDefineReactPluginConfig","options","defineSvgrPluginConfig","defineStorybookConfig","plugins","sourceMap","react","svgr","transformers","config","transformedConfig"],"mappings":"
|
|
1
|
+
{"version":3,"file":"storybook.js","sources":["../src/storybook.ts"],"sourcesContent":["import { pluginReact, type PluginReactOptions } from \"@rsbuild/plugin-react\";\nimport { pluginSvgr, type PluginSvgrOptions } from \"@rsbuild/plugin-svgr\";\nimport { defineConfig, type Rsbuild } from \"@rslib/core\";\nimport { applyTransformers, type RslibConfigTransformer } from \"./applyTransformers.ts\";\n\nexport type DefineStorybookDefineReactPluginConfigFunction = (defaultOptions: PluginReactOptions) => PluginReactOptions;\nexport type DefineStorybookSvgrPluginConfigFunction = (defaultOptions: PluginSvgrOptions) => PluginSvgrOptions;\n\nexport interface DefineStorybookConfigOptions {\n plugins?: Rsbuild.RsbuildPlugins;\n sourceMap?: boolean | Rsbuild.SourceMap;\n react?: false | DefineStorybookDefineReactPluginConfigFunction;\n svgr?: false | DefineStorybookSvgrPluginConfigFunction;\n transformers?: RslibConfigTransformer[];\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 sourceMap = {\n js: \"cheap-module-source-map\",\n css: true\n },\n react = defaultDefineReactPluginConfig,\n svgr = defineSvgrPluginConfig,\n transformers = []\n } = options;\n\n const config = defineConfig({\n lib: [{\n dts: false\n }],\n output: {\n target: \"web\",\n // Setting the clean option to true breaks the Storybook integration.\n cleanDistPath: false,\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 ]\n });\n\n const transformedConfig = applyTransformers(config, transformers, {\n environment: \"storybook\"\n });\n\n return defineConfig(transformedConfig);\n}\n"],"names":["pluginReact","pluginSvgr","defineConfig","applyTransformers","defaultDefineReactPluginConfig","options","defineSvgrPluginConfig","defineStorybookConfig","plugins","sourceMap","react","svgr","transformers","config","transformedConfig"],"mappings":";;;;;;;;;AAA6E;AACH;AACjB;AAC+B;AAaxF,SAASI,8BAA8BA,CAACC,OAA2B;IAC/D,OAAOA;AACX;AAEA,SAASC,sBAAsBA,CAACD,OAA0B;IACtD,OAAOA;AACX;AAEO,SAASE,qBAAqBA,CAACF,UAAwC,CAAC,CAAC;IAC5E,MAAM,EACFG,UAAU,EAAE,EACZC,YAAY;QACR,IAAI;QACJ,KAAK;IACT,CAAC,EACDC,QAAQN,8BAA8B,EACtCO,OAAOL,sBAAsB,EAC7BM,eAAe,EAAE,EACpB,GAAGP;IAEJ,MAAMQ,SAASX,YAAYA,CAAC;QACxB,KAAK;YAAC;gBACF,KAAK;YACT;SAAE;QACF,QAAQ;YACJ,QAAQ;YACR,qEAAqE;YACrE,eAAe;YACf,QAAQ;YACRO;QACJ;QACA,SAAS;YACLC,SAASV,WAAWA,CAACU,MAAM,CAAC;YAC5BC,QAAQV,UAAUA,CAACU,KAAK;gBACpB,aAAa;oBACT,YAAY;gBAChB;YACJ;eACGH;SACN;IACL;IAEA,MAAMM,oBAAoBX,iBAAiBA,CAACU,QAAQD,cAAc;QAC9D,aAAa;IACjB;IAEA,OAAOV,YAAYA,CAACY;AACxB"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@workleap/rslib-configs",
|
|
3
3
|
"author": "Workleap",
|
|
4
4
|
"description": "Workleap recommended Rslib configurations.",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.9",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -28,23 +28,23 @@
|
|
|
28
28
|
"CHANGELOG.md"
|
|
29
29
|
],
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@rslib/core": "^0.
|
|
31
|
+
"@rslib/core": "^0.20.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@rsbuild/plugin-react": "^1.4.
|
|
35
|
-
"@rsbuild/plugin-svgr": "^1.3.
|
|
34
|
+
"@rsbuild/plugin-react": "^1.4.6",
|
|
35
|
+
"@rsbuild/plugin-svgr": "^1.3.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@eslint/js": "9.39.2",
|
|
39
|
-
"@rslib/core": "0.
|
|
40
|
-
"@types/node": "25.
|
|
41
|
-
"@typescript-eslint/parser": "8.
|
|
42
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
39
|
+
"@rslib/core": "0.20.0",
|
|
40
|
+
"@types/node": "25.5.0",
|
|
41
|
+
"@typescript-eslint/parser": "8.57.1",
|
|
42
|
+
"@typescript/native-preview": "7.0.0-dev.20260303.1",
|
|
43
43
|
"eslint": "9.39.2",
|
|
44
44
|
"typescript": "5.9.3",
|
|
45
|
-
"typescript-eslint": "8.
|
|
46
|
-
"vitest": "4.0
|
|
47
|
-
"@workleap/eslint-configs": "1.1.
|
|
45
|
+
"typescript-eslint": "8.57.1",
|
|
46
|
+
"vitest": "4.1.0",
|
|
47
|
+
"@workleap/eslint-configs": "1.1.15",
|
|
48
48
|
"@workleap/typescript-configs": "3.0.7"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|