storybook-builder-rsbuild 3.1.0 → 3.2.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 +1 -1
- package/compiled/@storybook/core-webpack/package.json +1 -1
- package/dist/_node-chunks/{chunk-J52G566E.js → chunk-O2XXP7GP.js} +6 -6
- package/dist/index.d.ts +3 -3
- package/dist/index.js +17 -15
- package/dist/loaders/export-order-loader.js +7 -7
- package/dist/loaders/rsbuild-automock-loader.js +7 -7
- package/dist/loaders/storybook-mock-transform-loader.js +7 -7
- package/dist/preview-preset.js +7 -7
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@storybook/core-webpack","version":"10.1.
|
|
1
|
+
{"name":"@storybook/core-webpack","version":"10.1.11","funding":{"type":"opencollective","url":"https://opencollective.com/storybook"},"license":"MIT","types":"index.d.ts","type":"module"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_053be3e4859af997 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_053be3e4859af997 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_053be3e4859af997 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_053be3e4859af997.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_053be3e4859af997.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_053be3e4859af997.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as rsbuildReal from '@rsbuild/core';
|
|
2
|
-
import { RsbuildConfig } from '@rsbuild/core';
|
|
2
|
+
import { RsbuildConfig, DevConfig } from '@rsbuild/core';
|
|
3
3
|
import { Builder, TypescriptOptions as TypescriptOptions$1, Options, StorybookConfigRaw, BuilderResult as BuilderResult$1 } from 'storybook/internal/types';
|
|
4
4
|
import { PluginTypeCheckerOptions } from '@rsbuild/plugin-type-check';
|
|
5
5
|
|
|
@@ -27,9 +27,9 @@ type BuilderOptions = {
|
|
|
27
27
|
*/
|
|
28
28
|
rsbuildConfigPath?: string;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Pass-through Rsbuild `dev.lazyCompilation` options.
|
|
31
31
|
*/
|
|
32
|
-
lazyCompilation?:
|
|
32
|
+
lazyCompilation?: DevConfig['lazyCompilation'];
|
|
33
33
|
/**
|
|
34
34
|
* Enable Rspack's [persistent cache(experimental)](https://rspack.dev/config/experiments#experimentscache).
|
|
35
35
|
* We continue to use the name `fsCache` here to maintain better compatibility with the webpack builder.
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_053be3e4859af997 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_053be3e4859af997 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_053be3e4859af997 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_053be3e4859af997.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_053be3e4859af997.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_053be3e4859af997.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
__commonJS,
|
|
14
14
|
__require,
|
|
15
15
|
__toESM
|
|
16
|
-
} from "./_node-chunks/chunk-
|
|
16
|
+
} from "./_node-chunks/chunk-O2XXP7GP.js";
|
|
17
17
|
|
|
18
18
|
// ../../node_modules/.pnpm/pretty-hrtime@1.0.3/node_modules/pretty-hrtime/index.js
|
|
19
19
|
var require_pretty_hrtime = __commonJS({
|
|
@@ -46,16 +46,18 @@ import { logger as rsbuildLogger } from "@rsbuild/core";
|
|
|
46
46
|
import picocolors from "picocolors";
|
|
47
47
|
import { logger } from "storybook/internal/node-logger";
|
|
48
48
|
function overrideRsbuildLogger() {
|
|
49
|
-
let logWithPrefix = (fn) => (msg) => fn(
|
|
49
|
+
let logWithPrefix = (fn) => (msg) => fn(
|
|
50
|
+
`${picocolors.black(picocolors.bgBlueBright("Rsbuild"))} ${String(msg)}`
|
|
51
|
+
);
|
|
50
52
|
rsbuildLogger.override({
|
|
51
53
|
error: logWithPrefix(logger.error),
|
|
52
54
|
warn: logWithPrefix(logger.warn),
|
|
53
|
-
info: logWithPrefix(logger.
|
|
55
|
+
info: logWithPrefix((msg) => logger.log(msg, { spacing: 0 })),
|
|
56
|
+
start: logWithPrefix(logger.info),
|
|
57
|
+
ready: logWithPrefix(logger.info),
|
|
54
58
|
success: logWithPrefix(logger.info),
|
|
55
|
-
debug: logWithPrefix(logger.info),
|
|
56
59
|
log: logWithPrefix(logger.info),
|
|
57
|
-
|
|
58
|
-
start: logWithPrefix(logger.info)
|
|
60
|
+
debug: logWithPrefix(logger.debug)
|
|
59
61
|
});
|
|
60
62
|
}
|
|
61
63
|
|
|
@@ -344,7 +346,7 @@ var getVirtualModules = async (options) => {
|
|
|
344
346
|
options
|
|
345
347
|
)).map((entry) => typeof entry == "object" ? entry.absolute : slash(entry)),
|
|
346
348
|
loadPreviewOrConfigFile(options)
|
|
347
|
-
].filter(Boolean), storiesFilename = "storybook-stories.js", storiesPath = resolve(join(workingDir, storiesFilename)), needPipelinedImport =
|
|
349
|
+
].filter(Boolean), storiesFilename = "storybook-stories.js", storiesPath = resolve(join(workingDir, storiesFilename)), needPipelinedImport = builderOptions.lazyCompilation !== !1 && !isProd;
|
|
348
350
|
virtualModules[storiesPath] = __webpack_exports__toImportFn(stories, {
|
|
349
351
|
needPipelinedImport
|
|
350
352
|
});
|
|
@@ -437,9 +439,9 @@ var require2 = createRequire(import.meta.url), getAbsolutePath = (input) => {
|
|
|
437
439
|
]), stories = normalizeStories2(nonNormalizedStories, {
|
|
438
440
|
configDir: options.configDir,
|
|
439
441
|
workingDir
|
|
440
|
-
}), shouldCheckTs = typescriptOptions.check && !typescriptOptions.skipCompiler, tsCheckOptions = typescriptOptions.checkOptions || {}, builderOptions = await getBuilderOptions2(options), cacheConfig = builderOptions.fsCache ? !0 : void 0, lazyCompilationConfig = builderOptions.lazyCompilation
|
|
442
|
+
}), shouldCheckTs = typescriptOptions.check && !typescriptOptions.skipCompiler, tsCheckOptions = typescriptOptions.checkOptions || {}, builderOptions = await getBuilderOptions2(options), cacheConfig = builderOptions.fsCache ? !0 : void 0, lazyCompilationConfig = isProd ? void 0 : builderOptions.lazyCompilation === void 0 ? {
|
|
441
443
|
entries: !1
|
|
442
|
-
} :
|
|
444
|
+
} : builderOptions.lazyCompilation;
|
|
443
445
|
if (!template)
|
|
444
446
|
throw new Error(dedent`
|
|
445
447
|
Storybook's Webpack5 builder requires a template to be specified.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_053be3e4859af997 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_053be3e4859af997 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_053be3e4859af997 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_053be3e4859af997.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_053be3e4859af997.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_053be3e4859af997.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "../_node-chunks/chunk-
|
|
12
|
+
import "../_node-chunks/chunk-O2XXP7GP.js";
|
|
13
13
|
|
|
14
14
|
// src/loaders/export-order-loader.ts
|
|
15
15
|
import assert from "node:assert";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_053be3e4859af997 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_053be3e4859af997 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_053be3e4859af997 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_053be3e4859af997.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_053be3e4859af997.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_053be3e4859af997.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "../_node-chunks/chunk-
|
|
12
|
+
import "../_node-chunks/chunk-O2XXP7GP.js";
|
|
13
13
|
|
|
14
14
|
// src/loaders/rsbuild-automock-loader.ts
|
|
15
15
|
import { babelParser, getAutomockCode } from "storybook/internal/mocking-utils";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_053be3e4859af997 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_053be3e4859af997 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_053be3e4859af997 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_053be3e4859af997.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_053be3e4859af997.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_053be3e4859af997.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "../_node-chunks/chunk-
|
|
12
|
+
import "../_node-chunks/chunk-O2XXP7GP.js";
|
|
13
13
|
|
|
14
14
|
// src/loaders/storybook-mock-transform-loader.ts
|
|
15
15
|
import { rewriteSbMockImportCalls } from "storybook/internal/mocking-utils";
|
package/dist/preview-preset.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_053be3e4859af997 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_053be3e4859af997 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_053be3e4859af997 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_053be3e4859af997.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_053be3e4859af997.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_053be3e4859af997.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./_node-chunks/chunk-
|
|
12
|
+
import "./_node-chunks/chunk-O2XXP7GP.js";
|
|
13
13
|
|
|
14
14
|
// src/preview-preset.ts
|
|
15
15
|
import { createRequire } from "node:module";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storybook-builder-rsbuild",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Rsbuild builder for Storybook",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
],
|
|
10
10
|
"homepage": "https://storybook.rsbuild.rs",
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/
|
|
12
|
+
"url": "https://github.com/rstackjs/storybook-rsbuild/issues"
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/
|
|
16
|
+
"url": "https://github.com/rstackjs/storybook-rsbuild",
|
|
17
17
|
"directory": "packages/builder-rsbuild"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
"!src/**/*"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@rsbuild/plugin-type-check": "^1.2
|
|
46
|
+
"@rsbuild/plugin-type-check": "^1.3.2",
|
|
47
47
|
"@vitest/mocker": "3.2.4",
|
|
48
48
|
"browser-assert": "^1.2.1",
|
|
49
49
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
50
|
-
"cjs-module-lexer": "^2.
|
|
50
|
+
"cjs-module-lexer": "^2.2.0",
|
|
51
51
|
"constants-browserify": "^1.0.0",
|
|
52
52
|
"es-module-lexer": "^1.7.0",
|
|
53
|
-
"fs-extra": "^11.3.
|
|
53
|
+
"fs-extra": "^11.3.3",
|
|
54
54
|
"magic-string": "^0.30.21",
|
|
55
55
|
"path-browserify": "^1.0.1",
|
|
56
|
-
"picocolors": "^1.1.
|
|
56
|
+
"picocolors": "^1.1.1",
|
|
57
57
|
"process": "^0.11.10",
|
|
58
58
|
"rsbuild-plugin-html-minifier-terser": "^1.1.2",
|
|
59
59
|
"sirv": "^2.0.4",
|
|
@@ -63,21 +63,21 @@
|
|
|
63
63
|
"util-deprecate": "^1.0.2"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@rsbuild/core": "^1.
|
|
67
|
-
"@storybook/core-webpack": "10.1.
|
|
66
|
+
"@rsbuild/core": "^1.7.2",
|
|
67
|
+
"@storybook/core-webpack": "10.1.11",
|
|
68
68
|
"@types/fs-extra": "^11.0.4",
|
|
69
69
|
"@types/node": "^22.0.0",
|
|
70
70
|
"@types/pretty-hrtime": "^1.0.3",
|
|
71
71
|
"prebundle": "^1.6.0",
|
|
72
72
|
"pretty-hrtime": "^1.0.3",
|
|
73
73
|
"slash": "^5.1.0",
|
|
74
|
-
"storybook": "10.1.
|
|
74
|
+
"storybook": "10.1.11",
|
|
75
75
|
"typescript": "^5.9.3"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@rsbuild/core": "^1.5.0",
|
|
79
|
-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
|
|
80
|
-
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
|
|
79
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
80
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
81
81
|
"storybook": "^10.1.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependenciesMeta": {
|