storybook-builder-rsbuild 0.0.6 → 0.0.7
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.d.ts +1 -1
- package/dist/index.js +84 -34
- package/dist/index.mjs +67 -23
- package/package.json +9 -15
- package/templates/virtualModuleModernEntry.js.handlebars +2 -2
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as rsbuildReal from '@rsbuild/core';
|
2
2
|
import { RsbuildConfig } from '@rsbuild/core';
|
3
|
-
import { TypescriptOptions as TypescriptOptions$1, Builder, Options, BuilderResult as BuilderResult$1, NormalizedStoriesSpecifier } from '
|
3
|
+
import { TypescriptOptions as TypescriptOptions$1, Builder, Options, BuilderResult as BuilderResult$1, NormalizedStoriesSpecifier } from 'storybook/internal/types';
|
4
4
|
import { PluginTypeCheckerOptions } from '@rsbuild/plugin-type-check';
|
5
5
|
|
6
6
|
type RsbuildStats = {
|
package/dist/index.js
CHANGED
@@ -121,23 +121,23 @@ __export(src_exports, {
|
|
121
121
|
});
|
122
122
|
module.exports = __toCommonJS(src_exports);
|
123
123
|
var rsbuildReal = __toESM(require("@rsbuild/core"));
|
124
|
-
var
|
124
|
+
var import_path5 = require("path");
|
125
125
|
var import_express = __toESM(require("express"));
|
126
126
|
var import_fs_extra = __toESM(require("fs-extra"));
|
127
|
-
var import_server_errors = require("
|
127
|
+
var import_server_errors = require("storybook/internal/server-errors");
|
128
128
|
|
129
129
|
// src/preview/iframe-rsbuild.config.ts
|
130
130
|
var import_path3 = require("path");
|
131
131
|
var import_case_sensitive_paths_webpack_plugin = __toESM(require("case-sensitive-paths-webpack-plugin"));
|
132
|
-
var import_globals = require("
|
133
|
-
var
|
132
|
+
var import_globals = require("storybook/internal/preview/globals");
|
133
|
+
var import_common2 = require("storybook/internal/common");
|
134
134
|
var import_ts_dedent2 = require("ts-dedent");
|
135
135
|
|
136
136
|
// src/preview/virtual-module-mapping.ts
|
137
137
|
var import_path = __toESM(require("path"));
|
138
138
|
var import_fs = __toESM(require("fs"));
|
139
139
|
var import_path2 = require("path");
|
140
|
-
var
|
140
|
+
var import_common = require("storybook/internal/common");
|
141
141
|
|
142
142
|
// ../../node_modules/.pnpm/slash@5.1.0/node_modules/slash/index.js
|
143
143
|
function slash(path2) {
|
@@ -158,7 +158,7 @@ var getVirtualModules = async (options) => {
|
|
158
158
|
const isProd = options.configType === "PRODUCTION";
|
159
159
|
const nonNormalizedStories = await options.presets.apply("stories", []);
|
160
160
|
const entries = [];
|
161
|
-
const stories = (0,
|
161
|
+
const stories = (0, import_common.normalizeStories)(nonNormalizedStories, {
|
162
162
|
configDir: options.configDir,
|
163
163
|
workingDir
|
164
164
|
});
|
@@ -174,7 +174,7 @@ var getVirtualModules = async (options) => {
|
|
174
174
|
}
|
175
175
|
return slash(entry);
|
176
176
|
}),
|
177
|
-
(0,
|
177
|
+
(0, import_common.loadPreviewOrConfigFile)(options)
|
178
178
|
].filter(Boolean);
|
179
179
|
const storiesFilename = "storybook-stories.js";
|
180
180
|
const storiesPath = (0, import_path2.resolve)((0, import_path2.join)(workingDir, storiesFilename));
|
@@ -183,8 +183,8 @@ var getVirtualModules = async (options) => {
|
|
183
183
|
needPipelinedImport
|
184
184
|
});
|
185
185
|
const configEntryPath = (0, import_path2.resolve)((0, import_path2.join)(workingDir, "storybook-config-entry.js"));
|
186
|
-
virtualModules[configEntryPath] = (0,
|
187
|
-
await (0,
|
186
|
+
virtualModules[configEntryPath] = (0, import_common.handlebars)(
|
187
|
+
await (0, import_common.readTemplate)(
|
188
188
|
require.resolve("storybook-builder-rsbuild/templates/virtualModuleModernEntry.js.handlebars")
|
189
189
|
),
|
190
190
|
{
|
@@ -273,6 +273,7 @@ function importPipeline() {
|
|
273
273
|
var import_core = require("@rsbuild/core");
|
274
274
|
var import_preset = require("@storybook/addon-docs/dist/preset");
|
275
275
|
var import_plugin_type_check = require("@rsbuild/plugin-type-check");
|
276
|
+
var import_rsbuild_plugin_html_minifier_terser = require("rsbuild-plugin-html-minifier-terser");
|
276
277
|
var getAbsolutePath = (input) => (0, import_path3.dirname)(require.resolve((0, import_path3.join)(input, "package.json")));
|
277
278
|
var maybeGetAbsolutePath = (input) => {
|
278
279
|
try {
|
@@ -339,8 +340,8 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
339
340
|
options.presets.apply("build"),
|
340
341
|
presets.apply("tags", {})
|
341
342
|
]);
|
342
|
-
const { rsbuildConfigPath } = await (0,
|
343
|
-
const stories = (0,
|
343
|
+
const { rsbuildConfigPath } = await (0, import_common2.getBuilderOptions)(options);
|
344
|
+
const stories = (0, import_common2.normalizeStories)(nonNormalizedStories, {
|
344
345
|
configDir: options.configDir,
|
345
346
|
workingDir
|
346
347
|
});
|
@@ -405,7 +406,7 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
405
406
|
main: [...entries ?? [], ...dynamicEntries]
|
406
407
|
},
|
407
408
|
define: {
|
408
|
-
...(0,
|
409
|
+
...(0, import_common2.stringifyProcessEnvs)(envs),
|
409
410
|
NODE_ENV: JSON.stringify(process.env.NODE_ENV)
|
410
411
|
}
|
411
412
|
},
|
@@ -417,9 +418,17 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
417
418
|
}
|
418
419
|
}
|
419
420
|
},
|
420
|
-
plugins: [
|
421
|
-
|
422
|
-
|
421
|
+
plugins: [
|
422
|
+
shouldCheckTs ? (0, import_plugin_type_check.pluginTypeCheck)(tsCheckOptions) : null,
|
423
|
+
(0, import_rsbuild_plugin_html_minifier_terser.pluginHtmlMinifierTerser)({
|
424
|
+
collapseWhitespace: true,
|
425
|
+
removeComments: true,
|
426
|
+
removeRedundantAttributes: true,
|
427
|
+
removeScriptTypeAttributes: false,
|
428
|
+
removeStyleLinkTypeAttributes: true,
|
429
|
+
useShortDoctype: true
|
430
|
+
})
|
431
|
+
].filter(Boolean),
|
423
432
|
tools: {
|
424
433
|
rspack: (config, { addRules, appendPlugins, rspack, mergeConfig }) => {
|
425
434
|
addRules({
|
@@ -433,7 +442,7 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
433
442
|
]
|
434
443
|
});
|
435
444
|
config.resolve ??= {};
|
436
|
-
config.resolve.symlinks = !(0,
|
445
|
+
config.resolve.symlinks = !(0, import_common2.isPreservingSymlinks)();
|
437
446
|
config.watchOptions = {
|
438
447
|
ignored: /node_modules/
|
439
448
|
};
|
@@ -458,6 +467,10 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
458
467
|
config.optimization.runtimeChunk = true;
|
459
468
|
config.optimization.usedExports = options.build?.test?.disableTreeShaking ? false : isProd;
|
460
469
|
config.optimization.moduleIds = "named";
|
470
|
+
config.module ??= {};
|
471
|
+
config.module.parser ??= {};
|
472
|
+
config.module.parser.javascript ??= {};
|
473
|
+
config.module.parser.javascript.exportsPresence = false;
|
461
474
|
appendPlugins(
|
462
475
|
[
|
463
476
|
new rspack.ProvidePlugin({
|
@@ -494,14 +507,6 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
494
507
|
},
|
495
508
|
headHtmlSnippet,
|
496
509
|
bodyHtmlSnippet
|
497
|
-
},
|
498
|
-
minify: {
|
499
|
-
collapseWhitespace: true,
|
500
|
-
removeComments: true,
|
501
|
-
removeRedundantAttributes: true,
|
502
|
-
removeScriptTypeAttributes: false,
|
503
|
-
removeStyleLinkTypeAttributes: true,
|
504
|
-
useShortDoctype: true
|
505
510
|
}
|
506
511
|
}
|
507
512
|
}
|
@@ -509,10 +514,50 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
509
514
|
return merged;
|
510
515
|
};
|
511
516
|
|
517
|
+
// src/index.ts
|
518
|
+
var import_core_path = require("storybook/core-path");
|
519
|
+
|
520
|
+
// src/react-shims.ts
|
521
|
+
var import_path4 = require("path");
|
522
|
+
var import_promises = require("fs/promises");
|
523
|
+
var getIsReactVersion18or19 = async (options) => {
|
524
|
+
const { legacyRootApi } = await options.presets.apply(
|
525
|
+
"frameworkOptions"
|
526
|
+
) || {};
|
527
|
+
if (legacyRootApi) {
|
528
|
+
return false;
|
529
|
+
}
|
530
|
+
const resolvedReact = await options.presets.apply(
|
531
|
+
"resolvedReact",
|
532
|
+
{}
|
533
|
+
);
|
534
|
+
const reactDom = resolvedReact.reactDom || (0, import_path4.dirname)(require.resolve("react-dom/package.json"));
|
535
|
+
if (!(0, import_path4.isAbsolute)(reactDom)) {
|
536
|
+
return false;
|
537
|
+
}
|
538
|
+
const { version } = JSON.parse(
|
539
|
+
await (0, import_promises.readFile)((0, import_path4.join)(reactDom, "package.json"), "utf-8")
|
540
|
+
);
|
541
|
+
return version.startsWith("18") || version.startsWith("19") || version.startsWith("0.0.0");
|
542
|
+
};
|
543
|
+
var applyReactShims = async (config, options) => {
|
544
|
+
const isReactVersion18 = await getIsReactVersion18or19(options);
|
545
|
+
if (isReactVersion18) {
|
546
|
+
return void 0;
|
547
|
+
}
|
548
|
+
return {
|
549
|
+
source: {
|
550
|
+
alias: {
|
551
|
+
"@storybook/react-dom-shim": "@storybook/react-dom-shim/dist/react-16"
|
552
|
+
}
|
553
|
+
}
|
554
|
+
};
|
555
|
+
};
|
556
|
+
|
512
557
|
// src/index.ts
|
513
558
|
var import_pretty_hrtime = __toESM(require_pretty_hrtime());
|
559
|
+
var import_core2 = require("@rsbuild/core");
|
514
560
|
var printDuration = (startTime) => (0, import_pretty_hrtime.default)(process.hrtime(startTime)).replace(" ms", " milliseconds").replace(" s", " seconds").replace(" m", " minutes");
|
515
|
-
var getAbsolutePath2 = (input) => (0, import_path4.dirname)(require.resolve((0, import_path4.join)(input, "package.json")));
|
516
561
|
var executor = {
|
517
562
|
get: async (options) => {
|
518
563
|
const rsbuildInstance = await options.presets.apply("rsbuildInstance") || rsbuildReal;
|
@@ -520,14 +565,19 @@ var executor = {
|
|
520
565
|
}
|
521
566
|
};
|
522
567
|
var rsbuild = async (_, options) => {
|
523
|
-
const defaultConfig = await iframe_rsbuild_config_default(options);
|
524
568
|
const { presets } = options;
|
569
|
+
let defaultConfig = await iframe_rsbuild_config_default(options);
|
570
|
+
const shimsConfig = await applyReactShims(defaultConfig, options);
|
571
|
+
defaultConfig = (0, import_core2.mergeRsbuildConfig)(
|
572
|
+
defaultConfig,
|
573
|
+
shimsConfig
|
574
|
+
);
|
525
575
|
const finalDefaultConfig = await presets.apply(
|
526
576
|
"rsbuildFinal",
|
527
577
|
defaultConfig,
|
528
578
|
options
|
529
579
|
);
|
530
|
-
return finalDefaultConfig;
|
580
|
+
return (0, import_core2.mergeRsbuildConfig)(finalDefaultConfig);
|
531
581
|
};
|
532
582
|
var getConfig = async (options) => {
|
533
583
|
const { presets } = options;
|
@@ -585,8 +635,8 @@ var start = async ({
|
|
585
635
|
error: new Error(`Missing Rsbuild build instance at runtime!`)
|
586
636
|
});
|
587
637
|
}
|
588
|
-
const previewResolvedDir =
|
589
|
-
const previewDirOrigin =
|
638
|
+
const previewResolvedDir = (0, import_path5.join)(import_core_path.corePath, "dist/preview");
|
639
|
+
const previewDirOrigin = previewResolvedDir;
|
590
640
|
router.use(
|
591
641
|
`/sb-preview`,
|
592
642
|
import_express.default.static(previewDirOrigin, { immutable: true, maxAge: "5m" })
|
@@ -607,16 +657,16 @@ var build = async ({ options }) => {
|
|
607
657
|
cwd: process.cwd(),
|
608
658
|
rsbuildConfig: config
|
609
659
|
});
|
610
|
-
const previewResolvedDir =
|
611
|
-
const previewDirOrigin =
|
612
|
-
const previewDirTarget = (0,
|
660
|
+
const previewResolvedDir = (0, import_path5.join)(import_core_path.corePath, "dist/preview");
|
661
|
+
const previewDirOrigin = previewResolvedDir;
|
662
|
+
const previewDirTarget = (0, import_path5.join)(options.outputDir || "", `sb-preview`);
|
613
663
|
let stats;
|
614
664
|
rsbuildBuild.onAfterBuild((params) => {
|
615
665
|
stats = params.stats;
|
616
666
|
});
|
617
667
|
const previewFiles = import_fs_extra.default.copy(previewDirOrigin, previewDirTarget, {
|
618
668
|
filter: (src) => {
|
619
|
-
const { ext } = (0,
|
669
|
+
const { ext } = (0, import_path5.parse)(src);
|
620
670
|
if (ext) {
|
621
671
|
return ext === ".js";
|
622
672
|
}
|
@@ -629,7 +679,7 @@ var build = async ({ options }) => {
|
|
629
679
|
await Promise.all([rsbuildBuild.build(), previewFiles]);
|
630
680
|
return stats;
|
631
681
|
};
|
632
|
-
var corePresets = [(0,
|
682
|
+
var corePresets = [(0, import_path5.join)(__dirname, "./preview-preset.js")];
|
633
683
|
var previewMainTemplate = () => require.resolve("storybook-builder-rsbuild/templates/preview.ejs");
|
634
684
|
// Annotate the CommonJS export names for ESM import in node:
|
635
685
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
@@ -1,18 +1,21 @@
|
|
1
1
|
import { __commonJS, __toESM, __require } from './chunk-TTFRSOOU.mjs';
|
2
2
|
import * as rsbuildReal from '@rsbuild/core';
|
3
|
-
import {
|
4
|
-
import path, { join, resolve, parse, dirname } from 'path';
|
3
|
+
import { mergeRsbuildConfig, loadConfig } from '@rsbuild/core';
|
4
|
+
import path, { join, resolve, parse, dirname, isAbsolute } from 'path';
|
5
5
|
import express from 'express';
|
6
6
|
import fs2 from 'fs-extra';
|
7
|
-
import { WebpackInvocationError } from '
|
7
|
+
import { WebpackInvocationError } from 'storybook/internal/server-errors';
|
8
8
|
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
|
9
|
-
import { globalsNameReferenceMap } from '
|
10
|
-
import { normalizeStories, loadPreviewOrConfigFile, handlebars, readTemplate, getBuilderOptions, stringifyProcessEnvs, isPreservingSymlinks } from '
|
9
|
+
import { globalsNameReferenceMap } from 'storybook/internal/preview/globals';
|
10
|
+
import { normalizeStories, loadPreviewOrConfigFile, handlebars, readTemplate, getBuilderOptions, stringifyProcessEnvs, isPreservingSymlinks } from 'storybook/internal/common';
|
11
11
|
import { dedent } from 'ts-dedent';
|
12
12
|
import fs from 'fs';
|
13
13
|
import { webpackIncludeRegexp } from '@storybook/core-webpack';
|
14
14
|
import { webpack } from '@storybook/addon-docs/dist/preset';
|
15
15
|
import { pluginTypeCheck } from '@rsbuild/plugin-type-check';
|
16
|
+
import { pluginHtmlMinifierTerser } from 'rsbuild-plugin-html-minifier-terser';
|
17
|
+
import { corePath } from 'storybook/core-path';
|
18
|
+
import { readFile } from 'fs/promises';
|
16
19
|
|
17
20
|
// ../../node_modules/.pnpm/pretty-hrtime@1.0.3/node_modules/pretty-hrtime/index.js
|
18
21
|
var require_pretty_hrtime = __commonJS({
|
@@ -356,9 +359,17 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
356
359
|
}
|
357
360
|
}
|
358
361
|
},
|
359
|
-
plugins: [
|
360
|
-
|
361
|
-
|
362
|
+
plugins: [
|
363
|
+
shouldCheckTs ? pluginTypeCheck(tsCheckOptions) : null,
|
364
|
+
pluginHtmlMinifierTerser({
|
365
|
+
collapseWhitespace: true,
|
366
|
+
removeComments: true,
|
367
|
+
removeRedundantAttributes: true,
|
368
|
+
removeScriptTypeAttributes: false,
|
369
|
+
removeStyleLinkTypeAttributes: true,
|
370
|
+
useShortDoctype: true
|
371
|
+
})
|
372
|
+
].filter(Boolean),
|
362
373
|
tools: {
|
363
374
|
rspack: (config, { addRules, appendPlugins, rspack, mergeConfig }) => {
|
364
375
|
addRules({
|
@@ -399,6 +410,10 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
399
410
|
config.optimization.runtimeChunk = true;
|
400
411
|
config.optimization.usedExports = options.build?.test?.disableTreeShaking ? false : isProd;
|
401
412
|
config.optimization.moduleIds = "named";
|
413
|
+
config.module ??= {};
|
414
|
+
config.module.parser ??= {};
|
415
|
+
config.module.parser.javascript ??= {};
|
416
|
+
config.module.parser.javascript.exportsPresence = false;
|
402
417
|
appendPlugins(
|
403
418
|
[
|
404
419
|
new rspack.ProvidePlugin({
|
@@ -435,25 +450,49 @@ var iframe_rsbuild_config_default = async (options) => {
|
|
435
450
|
},
|
436
451
|
headHtmlSnippet,
|
437
452
|
bodyHtmlSnippet
|
438
|
-
},
|
439
|
-
minify: {
|
440
|
-
collapseWhitespace: true,
|
441
|
-
removeComments: true,
|
442
|
-
removeRedundantAttributes: true,
|
443
|
-
removeScriptTypeAttributes: false,
|
444
|
-
removeStyleLinkTypeAttributes: true,
|
445
|
-
useShortDoctype: true
|
446
453
|
}
|
447
454
|
}
|
448
455
|
}
|
449
456
|
});
|
450
457
|
return merged;
|
451
458
|
};
|
459
|
+
var getIsReactVersion18or19 = async (options) => {
|
460
|
+
const { legacyRootApi } = await options.presets.apply(
|
461
|
+
"frameworkOptions"
|
462
|
+
) || {};
|
463
|
+
if (legacyRootApi) {
|
464
|
+
return false;
|
465
|
+
}
|
466
|
+
const resolvedReact = await options.presets.apply(
|
467
|
+
"resolvedReact",
|
468
|
+
{}
|
469
|
+
);
|
470
|
+
const reactDom = resolvedReact.reactDom || dirname(__require.resolve("react-dom/package.json"));
|
471
|
+
if (!isAbsolute(reactDom)) {
|
472
|
+
return false;
|
473
|
+
}
|
474
|
+
const { version } = JSON.parse(
|
475
|
+
await readFile(join(reactDom, "package.json"), "utf-8")
|
476
|
+
);
|
477
|
+
return version.startsWith("18") || version.startsWith("19") || version.startsWith("0.0.0");
|
478
|
+
};
|
479
|
+
var applyReactShims = async (config, options) => {
|
480
|
+
const isReactVersion18 = await getIsReactVersion18or19(options);
|
481
|
+
if (isReactVersion18) {
|
482
|
+
return void 0;
|
483
|
+
}
|
484
|
+
return {
|
485
|
+
source: {
|
486
|
+
alias: {
|
487
|
+
"@storybook/react-dom-shim": "@storybook/react-dom-shim/dist/react-16"
|
488
|
+
}
|
489
|
+
}
|
490
|
+
};
|
491
|
+
};
|
452
492
|
|
453
493
|
// src/index.ts
|
454
494
|
var import_pretty_hrtime = __toESM(require_pretty_hrtime());
|
455
495
|
var printDuration = (startTime) => (0, import_pretty_hrtime.default)(process.hrtime(startTime)).replace(" ms", " milliseconds").replace(" s", " seconds").replace(" m", " minutes");
|
456
|
-
var getAbsolutePath2 = (input) => dirname(__require.resolve(join(input, "package.json")));
|
457
496
|
var executor = {
|
458
497
|
get: async (options) => {
|
459
498
|
const rsbuildInstance = await options.presets.apply("rsbuildInstance") || rsbuildReal;
|
@@ -461,14 +500,19 @@ var executor = {
|
|
461
500
|
}
|
462
501
|
};
|
463
502
|
var rsbuild = async (_, options) => {
|
464
|
-
const defaultConfig = await iframe_rsbuild_config_default(options);
|
465
503
|
const { presets } = options;
|
504
|
+
let defaultConfig = await iframe_rsbuild_config_default(options);
|
505
|
+
const shimsConfig = await applyReactShims(defaultConfig, options);
|
506
|
+
defaultConfig = mergeRsbuildConfig(
|
507
|
+
defaultConfig,
|
508
|
+
shimsConfig
|
509
|
+
);
|
466
510
|
const finalDefaultConfig = await presets.apply(
|
467
511
|
"rsbuildFinal",
|
468
512
|
defaultConfig,
|
469
513
|
options
|
470
514
|
);
|
471
|
-
return finalDefaultConfig;
|
515
|
+
return mergeRsbuildConfig(finalDefaultConfig);
|
472
516
|
};
|
473
517
|
var getConfig = async (options) => {
|
474
518
|
const { presets } = options;
|
@@ -526,8 +570,8 @@ var start = async ({
|
|
526
570
|
error: new Error(`Missing Rsbuild build instance at runtime!`)
|
527
571
|
});
|
528
572
|
}
|
529
|
-
const previewResolvedDir =
|
530
|
-
const previewDirOrigin =
|
573
|
+
const previewResolvedDir = join(corePath, "dist/preview");
|
574
|
+
const previewDirOrigin = previewResolvedDir;
|
531
575
|
router.use(
|
532
576
|
`/sb-preview`,
|
533
577
|
express.static(previewDirOrigin, { immutable: true, maxAge: "5m" })
|
@@ -548,8 +592,8 @@ var build = async ({ options }) => {
|
|
548
592
|
cwd: process.cwd(),
|
549
593
|
rsbuildConfig: config
|
550
594
|
});
|
551
|
-
const previewResolvedDir =
|
552
|
-
const previewDirOrigin =
|
595
|
+
const previewResolvedDir = join(corePath, "dist/preview");
|
596
|
+
const previewDirOrigin = previewResolvedDir;
|
553
597
|
const previewDirTarget = join(options.outputDir || "", `sb-preview`);
|
554
598
|
let stats;
|
555
599
|
rsbuildBuild.onAfterBuild((params) => {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "storybook-builder-rsbuild",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.7",
|
4
4
|
"description": "Rsbuild builder for Storybook",
|
5
5
|
"keywords": [
|
6
6
|
"storybook",
|
@@ -56,18 +56,9 @@
|
|
56
56
|
"!src/**/*"
|
57
57
|
],
|
58
58
|
"dependencies": {
|
59
|
-
"@rsbuild/plugin-type-check": "0.
|
60
|
-
"@storybook/addon-docs": "^8.
|
61
|
-
"@storybook/
|
62
|
-
"@storybook/client-logger": "^8.0.10",
|
63
|
-
"@storybook/core-common": "^8.0.10",
|
64
|
-
"@storybook/core-events": "^8.0.10",
|
65
|
-
"@storybook/core-webpack": "^8.0.10",
|
66
|
-
"@storybook/node-logger": "^8.0.10",
|
67
|
-
"@storybook/preview": "^8.0.10",
|
68
|
-
"@storybook/preview-api": "^8.0.10",
|
69
|
-
"@storybook/react-dom-shim": "^8.0.10",
|
70
|
-
"@storybook/types": "^8.0.10",
|
59
|
+
"@rsbuild/plugin-type-check": "1.0.0-alpha.9",
|
60
|
+
"@storybook/addon-docs": "^8.2.1",
|
61
|
+
"@storybook/core-webpack": "^8.2.1",
|
71
62
|
"browser-assert": "^1.2.1",
|
72
63
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
73
64
|
"cjs-module-lexer": "^1.2.3",
|
@@ -79,6 +70,7 @@
|
|
79
70
|
"magic-string": "^0.30.5",
|
80
71
|
"path-browserify": "^1.0.1",
|
81
72
|
"process": "^0.11.10",
|
73
|
+
"rsbuild-plugin-html-minifier-terser": "^1.1.0",
|
82
74
|
"style-loader": "^3.3.1",
|
83
75
|
"ts-dedent": "^2.2.0",
|
84
76
|
"url": "^0.11.0",
|
@@ -86,7 +78,7 @@
|
|
86
78
|
"util-deprecate": "^1.0.2"
|
87
79
|
},
|
88
80
|
"devDependencies": {
|
89
|
-
"@rsbuild/core": "0.
|
81
|
+
"@rsbuild/core": "1.0.0-alpha.9",
|
90
82
|
"@types/express": "^4.17.21",
|
91
83
|
"@types/fs-extra": "^11.0.4",
|
92
84
|
"@types/node": "^18.0.0",
|
@@ -94,10 +86,12 @@
|
|
94
86
|
"add": "^2.0.6",
|
95
87
|
"pretty-hrtime": "^1.0.3",
|
96
88
|
"slash": "^5.0.0",
|
89
|
+
"storybook": "8.2.1",
|
97
90
|
"typescript": "^5.3.2"
|
98
91
|
},
|
99
92
|
"peerDependencies": {
|
100
|
-
"@rsbuild/core": ">= 0.
|
93
|
+
"@rsbuild/core": ">= 1.0.0-alpha.9",
|
94
|
+
"storybook": "^8.2.1"
|
101
95
|
},
|
102
96
|
"peerDependenciesMeta": {
|
103
97
|
"typescript": {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { global } from '@storybook/global';
|
2
2
|
|
3
|
-
import { ClientApi, PreviewWeb, addons, composeConfigs } from '
|
4
|
-
import { createBrowserChannel } from '
|
3
|
+
import { ClientApi, PreviewWeb, addons, composeConfigs } from 'storybook/internal/preview-api';
|
4
|
+
import { createBrowserChannel } from 'storybook/internal/channels';
|
5
5
|
|
6
6
|
import { importFn } from './{{storiesFilename}}';
|
7
7
|
|