storybook-builder-rsbuild 0.0.1-beta.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.
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/presets/custom-rsbuild-preset.ts
31
+ var custom_rsbuild_preset_exports = {};
32
+ __export(custom_rsbuild_preset_exports, {
33
+ rsbuild: () => rsbuild,
34
+ rsbuildInstance: () => rsbuildInstance,
35
+ rsbuildVersion: () => rsbuildVersion
36
+ });
37
+ module.exports = __toCommonJS(custom_rsbuild_preset_exports);
38
+ var rsbuildReal = __toESM(require("@rsbuild/core"));
39
+ async function rsbuild(config, options) {
40
+ const { presets } = options;
41
+ let defaultConfig = config;
42
+ const finalDefaultConfig = await presets.apply(
43
+ "rsbuildFinal",
44
+ defaultConfig,
45
+ options
46
+ );
47
+ return finalDefaultConfig;
48
+ }
49
+ var rsbuildInstance = async () => rsbuildReal;
50
+ var rsbuildVersion = async () => "0.7";
51
+ // Annotate the CommonJS export names for ESM import in node:
52
+ 0 && (module.exports = {
53
+ rsbuild,
54
+ rsbuildInstance,
55
+ rsbuildVersion
56
+ });
@@ -0,0 +1,2 @@
1
+ // dev-mode
2
+ export * from '../../src/presets/preview-preset';
@@ -0,0 +1,427 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/presets/preview-preset.ts
31
+ var preview_preset_exports = {};
32
+ __export(preview_preset_exports, {
33
+ entries: () => entries,
34
+ previewMainTemplate: () => previewMainTemplate,
35
+ rsbuild: () => rsbuild
36
+ });
37
+ module.exports = __toCommonJS(preview_preset_exports);
38
+
39
+ // src/preview/iframe-rsbuild.config.ts
40
+ var import_path3 = require("path");
41
+ var import_case_sensitive_paths_webpack_plugin = __toESM(require("case-sensitive-paths-webpack-plugin"));
42
+ var import_globals = require("@storybook/preview/globals");
43
+ var import_core_common2 = require("@storybook/core-common");
44
+ var import_ts_dedent2 = require("ts-dedent");
45
+
46
+ // src/preview/virtual-module-mapping.ts
47
+ var import_path = __toESM(require("path"));
48
+ var import_fs = __toESM(require("fs"));
49
+ var import_path2 = require("path");
50
+ var import_core_common = require("@storybook/core-common");
51
+
52
+ // ../../node_modules/.pnpm/slash@5.1.0/node_modules/slash/index.js
53
+ function slash(path2) {
54
+ const isExtendedLengthPath = path2.startsWith("\\\\?\\");
55
+ if (isExtendedLengthPath) {
56
+ return path2;
57
+ }
58
+ return path2.replace(/\\/g, "/");
59
+ }
60
+
61
+ // src/preview/virtual-module-mapping.ts
62
+ var import_core_webpack = require("@storybook/core-webpack");
63
+ var import_ts_dedent = require("ts-dedent");
64
+ var getVirtualModules = async (options) => {
65
+ const virtualModules = {};
66
+ const cwd = process.cwd();
67
+ const workingDir = options.cache?.basePath || process.cwd();
68
+ const isProd = options.configType === "PRODUCTION";
69
+ const nonNormalizedStories = await options.presets.apply("stories", []);
70
+ const entries2 = [];
71
+ const stories = (0, import_core_common.normalizeStories)(nonNormalizedStories, {
72
+ configDir: options.configDir,
73
+ workingDir
74
+ });
75
+ const realPathRelativeToCwd = import_path.default.relative(workingDir, cwd);
76
+ const previewAnnotations = [
77
+ ...(await options.presets.apply(
78
+ "previewAnnotations",
79
+ [],
80
+ options
81
+ )).map((entry) => {
82
+ if (typeof entry === "object") {
83
+ return entry.absolute;
84
+ }
85
+ return slash(entry);
86
+ }),
87
+ (0, import_core_common.loadPreviewOrConfigFile)(options)
88
+ ].filter(Boolean);
89
+ const storiesFilename = "storybook-stories.js";
90
+ const storiesPath = (0, import_path2.resolve)((0, import_path2.join)(workingDir, storiesFilename));
91
+ const needPipelinedImport = !isProd;
92
+ virtualModules[storiesPath] = toImportFn(stories, realPathRelativeToCwd, {
93
+ needPipelinedImport
94
+ });
95
+ const configEntryPath = (0, import_path2.resolve)((0, import_path2.join)(workingDir, "storybook-config-entry.js"));
96
+ virtualModules[configEntryPath] = (0, import_core_common.handlebars)(
97
+ await (0, import_core_common.readTemplate)(
98
+ require.resolve("@storybook/builder-rsbuild/templates/virtualModuleModernEntry.js.handlebars")
99
+ ),
100
+ {
101
+ storiesFilename,
102
+ previewAnnotations
103
+ }
104
+ // We need to double escape `\` for webpack. We may have some in windows paths
105
+ ).replace(/\\/g, "\\\\");
106
+ entries2.push(configEntryPath);
107
+ Object.entries(virtualModules).forEach(([key, value]) => {
108
+ import_fs.default.writeFileSync(key, value);
109
+ });
110
+ return {
111
+ virtualModules,
112
+ entries: entries2
113
+ };
114
+ };
115
+ function toImportFnPart(specifier) {
116
+ const { directory, importPathMatcher } = specifier;
117
+ return import_ts_dedent.dedent`
118
+ async (path) => {
119
+ if (!${importPathMatcher}.exec(path)) {
120
+ return;
121
+ }
122
+
123
+ const pathRemainder = path.substring(${directory.length + 1});
124
+ return import(
125
+ /* webpackChunkName: "[request]" */
126
+ /* webpackInclude: ${(0, import_core_webpack.webpackIncludeRegexp)(specifier)} */
127
+ '${directory}/' + pathRemainder
128
+ );
129
+ }
130
+
131
+ `;
132
+ }
133
+ function toImportFn(stories, relativeOffset, { needPipelinedImport } = {}) {
134
+ let pipelinedImport = `const pipeline = (x) => x();`;
135
+ if (needPipelinedImport) {
136
+ pipelinedImport = `
137
+ const importPipeline = ${importPipeline};
138
+ const pipeline = importPipeline();
139
+ `;
140
+ }
141
+ return import_ts_dedent.dedent`
142
+ ${pipelinedImport}
143
+
144
+ const importers = [
145
+ ${stories.map(toImportFnPart).join(",\n")}
146
+ ];
147
+
148
+ export async function importFn(path) {
149
+ const offset = '${relativeOffset}';
150
+
151
+ for (let i = 0; i < importers.length; i++) {
152
+ const pathWithOffset = buildPath(offset, path)
153
+
154
+ const moduleExports = await pipeline(() => importers[i](pathWithOffset));
155
+ if (moduleExports) {
156
+ return moduleExports;
157
+ }
158
+ }
159
+ }
160
+
161
+ function buildPath(offset, path) {
162
+ if(path.startsWith('./')) {
163
+ return offset + '/' + path.substring(2);
164
+ } else {
165
+ return offset + '/' + path;
166
+ }
167
+ }
168
+ `;
169
+ }
170
+ function importPipeline() {
171
+ let importGate = Promise.resolve();
172
+ return async (importFn) => {
173
+ await importGate;
174
+ const moduleExportsPromise = importFn();
175
+ importGate = importGate.then(async () => {
176
+ await moduleExportsPromise;
177
+ });
178
+ return moduleExportsPromise;
179
+ };
180
+ }
181
+
182
+ // src/preview/iframe-rsbuild.config.ts
183
+ var import_core = require("@rsbuild/core");
184
+ var import_preset = require("@storybook/addon-docs/dist/preset");
185
+ var getAbsolutePath = (input) => (0, import_path3.dirname)(require.resolve((0, import_path3.join)(input, "package.json")));
186
+ var maybeGetAbsolutePath = (input) => {
187
+ try {
188
+ return getAbsolutePath(input);
189
+ } catch (e) {
190
+ return false;
191
+ }
192
+ };
193
+ var managerAPIPath = maybeGetAbsolutePath(`@storybook/manager-api`);
194
+ var componentsPath = maybeGetAbsolutePath(`@storybook/components`);
195
+ var globalPath = maybeGetAbsolutePath(`@storybook/global`);
196
+ var routerPath = maybeGetAbsolutePath(`@storybook/router`);
197
+ var themingPath = maybeGetAbsolutePath(`@storybook/theming`);
198
+ var storybookPaths = {
199
+ ...managerAPIPath ? {
200
+ [`@storybook/manager-api`]: managerAPIPath
201
+ } : {},
202
+ ...componentsPath ? { [`@storybook/components`]: componentsPath } : {},
203
+ ...globalPath ? { [`@storybook/global`]: globalPath } : {},
204
+ ...routerPath ? { [`@storybook/router`]: routerPath } : {},
205
+ ...themingPath ? { [`@storybook/theming`]: themingPath } : {}
206
+ };
207
+ var iframe_rsbuild_config_default = async (options) => {
208
+ const appliedDocsWebpack = await (0, import_preset.webpack)({}, options);
209
+ const {
210
+ outputDir = (0, import_path3.join)(".", "public"),
211
+ quiet,
212
+ packageJson,
213
+ configType,
214
+ presets,
215
+ previewUrl,
216
+ // typescriptOptions,
217
+ features
218
+ } = options;
219
+ const isProd = configType === "PRODUCTION";
220
+ const workingDir = process.cwd();
221
+ const [
222
+ coreOptions,
223
+ frameworkOptions,
224
+ envs,
225
+ logLevel,
226
+ headHtmlSnippet,
227
+ bodyHtmlSnippet,
228
+ template,
229
+ docsOptions,
230
+ entries2,
231
+ nonNormalizedStories,
232
+ // modulesCount = 1000,
233
+ build,
234
+ tagsOptions
235
+ ] = await Promise.all([
236
+ presets.apply("core"),
237
+ presets.apply("frameworkOptions1"),
238
+ presets.apply("env"),
239
+ presets.apply("logLevel", void 0),
240
+ presets.apply("previewHead"),
241
+ presets.apply("previewBody"),
242
+ presets.apply("previewMainTemplate"),
243
+ presets.apply("docs"),
244
+ presets.apply("entries", []),
245
+ presets.apply("stories", []),
246
+ options.cache?.get("modulesCount").catch(() => {
247
+ }),
248
+ options.presets.apply("build"),
249
+ presets.apply("tags", {})
250
+ ]);
251
+ const stories = (0, import_core_common2.normalizeStories)(nonNormalizedStories, {
252
+ configDir: options.configDir,
253
+ workingDir
254
+ });
255
+ if (!template) {
256
+ throw new Error(import_ts_dedent2.dedent`
257
+ Storybook's Webpack5 builder requires a template to be specified.
258
+ Somehow you've ended up with a falsy value for the template option.
259
+
260
+ Please file an issue at https://github.com/storybookjs/storybook with a reproduction.
261
+ `);
262
+ }
263
+ const externals = import_globals.globalsNameReferenceMap;
264
+ if (build?.test?.disableBlocks) {
265
+ externals["@storybook/blocks"] = "__STORYBOOK_BLOCKS_EMPTY_MODULE__";
266
+ }
267
+ const { virtualModules: _virtualModules, entries: dynamicEntries } = await getVirtualModules(options);
268
+ if (!options.cache) {
269
+ throw new Error("Cache is required");
270
+ }
271
+ const { content } = await (0, import_core.loadConfig)({
272
+ cwd: workingDir
273
+ });
274
+ const resourceFilename = isProd ? "static/media/[name].[contenthash:8][ext]" : "static/media/[path][name][ext]";
275
+ const merged = (0, import_core.mergeRsbuildConfig)(content, {
276
+ output: {
277
+ cleanDistPath: false,
278
+ dataUriLimit: {
279
+ media: 1e4
280
+ },
281
+ sourceMap: {
282
+ js: options.build?.test?.disableSourcemaps ? false : "cheap-module-source-map",
283
+ css: options.build?.test?.disableSourcemaps ? false : true
284
+ },
285
+ distPath: {
286
+ root: (0, import_path3.resolve)(process.cwd(), outputDir)
287
+ },
288
+ filename: {
289
+ js: isProd ? "[name].[contenthash:8].iframe.bundle.js" : "[name].iframe.bundle.js",
290
+ image: resourceFilename,
291
+ font: resourceFilename,
292
+ media: resourceFilename
293
+ },
294
+ assetPrefix: "/",
295
+ externals
296
+ },
297
+ dev: {
298
+ assetPrefix: "",
299
+ progressBar: !quiet
300
+ },
301
+ source: {
302
+ alias: {
303
+ ...storybookPaths
304
+ // '@storybook/react-dom-shim': '@storybook/react-dom-shim/dist/react-16',
305
+ },
306
+ entry: {
307
+ // to avoid `It's not allowed to load an initial chunk on demand. The chunk name "main" is already used by an entrypoint` of
308
+ main: [...entries2 ?? [], ...dynamicEntries]
309
+ },
310
+ define: {
311
+ ...(0, import_core_common2.stringifyProcessEnvs)(envs),
312
+ NODE_ENV: JSON.stringify(process.env.NODE_ENV)
313
+ }
314
+ },
315
+ performance: {
316
+ chunkSplit: {
317
+ strategy: "custom",
318
+ splitChunks: {
319
+ chunks: "all"
320
+ }
321
+ }
322
+ },
323
+ tools: {
324
+ rspack: (config, { addRules, appendPlugins, rspack, mergeConfig }) => {
325
+ addRules({
326
+ test: /\.stories\.([tj])sx?$|(stories|story)\.mdx$/,
327
+ exclude: /node_modules/,
328
+ enforce: "post",
329
+ use: [
330
+ {
331
+ loader: require.resolve("@storybook/builder-rsbuild/loaders/export-order-loader")
332
+ }
333
+ ]
334
+ });
335
+ config.resolve ??= {};
336
+ config.resolve.symlinks = !(0, import_core_common2.isPreservingSymlinks)();
337
+ config.watchOptions = {
338
+ ignored: /node_modules/
339
+ };
340
+ config.output = config.output || {};
341
+ config.output.publicPath = "";
342
+ config.ignoreWarnings = [
343
+ ...config.ignoreWarnings || [],
344
+ /export '\S+' was not found in 'global'/,
345
+ /export '\S+' was not found in '@storybook\/global'/
346
+ ];
347
+ config.resolve ??= {};
348
+ config.resolve.fallback ??= {
349
+ stream: false,
350
+ path: require.resolve("path-browserify"),
351
+ assert: require.resolve("browser-assert"),
352
+ util: require.resolve("util"),
353
+ url: require.resolve("url"),
354
+ fs: false,
355
+ constants: require.resolve("constants-browserify")
356
+ };
357
+ config.optimization ??= {};
358
+ config.optimization.runtimeChunk = true;
359
+ config.optimization.usedExports = options.build?.test?.disableTreeShaking ? false : isProd;
360
+ config.optimization.moduleIds = "named";
361
+ appendPlugins(
362
+ [
363
+ new rspack.ProvidePlugin({
364
+ process: require.resolve("process/browser.js")
365
+ }),
366
+ new import_case_sensitive_paths_webpack_plugin.default()
367
+ ].filter(Boolean)
368
+ );
369
+ console.log("\u{1F919}", appliedDocsWebpack);
370
+ return mergeConfig(config, appliedDocsWebpack);
371
+ },
372
+ htmlPlugin: {
373
+ filename: `iframe.html`,
374
+ // FIXME: `none` isn't a known option
375
+ chunksSortMode: "none",
376
+ alwaysWriteToDisk: true,
377
+ inject: false,
378
+ template,
379
+ templateParameters: {
380
+ version: packageJson.version,
381
+ globals: {
382
+ CONFIG_TYPE: configType,
383
+ LOGLEVEL: logLevel,
384
+ FRAMEWORK_OPTIONS: frameworkOptions,
385
+ CHANNEL_OPTIONS: coreOptions.channelOptions,
386
+ FEATURES: features,
387
+ PREVIEW_URL: previewUrl,
388
+ STORIES: stories.map((specifier) => ({
389
+ ...specifier,
390
+ importPathMatcher: specifier.importPathMatcher.source
391
+ })),
392
+ DOCS_OPTIONS: docsOptions,
393
+ TAGS_OPTIONS: tagsOptions,
394
+ ...build?.test?.disableBlocks ? { __STORYBOOK_BLOCKS_EMPTY_MODULE__: {} } : {}
395
+ },
396
+ headHtmlSnippet,
397
+ bodyHtmlSnippet
398
+ },
399
+ minify: {
400
+ collapseWhitespace: true,
401
+ removeComments: true,
402
+ removeRedundantAttributes: true,
403
+ removeScriptTypeAttributes: false,
404
+ removeStyleLinkTypeAttributes: true,
405
+ useShortDoctype: true
406
+ }
407
+ }
408
+ }
409
+ });
410
+ return merged;
411
+ };
412
+
413
+ // src/presets/preview-preset.ts
414
+ var rsbuild = async (_, options) => {
415
+ return iframe_rsbuild_config_default(options);
416
+ };
417
+ var entries = async (_, options) => {
418
+ let result = [];
419
+ return result;
420
+ };
421
+ var previewMainTemplate = () => require.resolve("@storybook/builder-rsbuild/templates/preview.ejs");
422
+ // Annotate the CommonJS export names for ESM import in node:
423
+ 0 && (module.exports = {
424
+ entries,
425
+ previewMainTemplate,
426
+ rsbuild
427
+ });
@@ -0,0 +1,2 @@
1
+ // dev-mode
2
+ export * from '../src/preview-preset';
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/preview-preset.ts
31
+ var preview_preset_exports = {};
32
+ __export(preview_preset_exports, {
33
+ previewMainTemplate: () => previewMainTemplate
34
+ });
35
+ module.exports = __toCommonJS(preview_preset_exports);
36
+ var previewMainTemplate = () => {
37
+ return require.resolve("storybook-builder-rsbuild/templates/preview.ejs");
38
+ };
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ previewMainTemplate
42
+ });
package/package.json ADDED
@@ -0,0 +1,112 @@
1
+ {
2
+ "name": "storybook-builder-rsbuild",
3
+ "version": "0.0.1-beta.0",
4
+ "description": "Rsbuild builder for Storybook",
5
+ "keywords": [
6
+ "storybook",
7
+ "rsbuild",
8
+ "rspack"
9
+ ],
10
+ "license": "MIT",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "node": "./dist/index.js",
15
+ "require": "./dist/index.js",
16
+ "import": "./dist/index.mjs"
17
+ },
18
+ "./presets/custom-rsbuild-preset": {
19
+ "types": "./dist/presets/custom-rsbuild-preset.d.ts",
20
+ "node": "./dist/presets/custom-rsbuild-preset.js",
21
+ "require": "./dist/presets/custom-rsbuild-preset.js"
22
+ },
23
+ "./preview-preset": {
24
+ "types": "./dist/preview-preset.d.ts",
25
+ "node": "./dist/preview-preset.js",
26
+ "require": "./dist/preview-preset.js"
27
+ },
28
+ "./loaders/export-order-loader": {
29
+ "types": "./dist/loaders/export-order-loader.d.ts",
30
+ "node": "./dist/loaders/export-order-loader.js",
31
+ "require": "./dist/loaders/export-order-loader.js"
32
+ },
33
+ "./templates/virtualModuleModernEntry.js.handlebars": "./templates/virtualModuleModernEntry.js.handlebars",
34
+ "./templates/preview.ejs": "./templates/preview.ejs",
35
+ "./templates/virtualModuleEntry.template.js": "./templates/virtualModuleEntry.template.js",
36
+ "./templates/virtualModuleStory.template.js": "./templates/virtualModuleStory.template.js",
37
+ "./package.json": "./package.json"
38
+ },
39
+ "main": "dist/index.js",
40
+ "module": "dist/index.mjs",
41
+ "types": "dist/index.d.ts",
42
+ "files": [
43
+ "dist/**/*",
44
+ "templates/**/*",
45
+ "README.md",
46
+ "*.js",
47
+ "*.d.ts",
48
+ "!src/**/*"
49
+ ],
50
+ "dependencies": {
51
+ "@rsbuild/core": "0.6.15",
52
+ "@rsbuild/shared": "0.6.15",
53
+ "@storybook/addon-docs": "8.0.10",
54
+ "@storybook/channels": "8.0.10",
55
+ "@storybook/client-logger": "8.0.10",
56
+ "@storybook/core-common": "8.0.10",
57
+ "@storybook/core-events": "8.0.10",
58
+ "@storybook/core-webpack": "8.0.10",
59
+ "@storybook/node-logger": "8.0.10",
60
+ "@storybook/preview": "8.0.10",
61
+ "@storybook/preview-api": "8.0.10",
62
+ "@storybook/react-dom-shim": "8.0.10",
63
+ "@storybook/types": "^8.0.10",
64
+ "browser-assert": "^1.2.1",
65
+ "case-sensitive-paths-webpack-plugin": "^2.4.0",
66
+ "cjs-module-lexer": "^1.2.3",
67
+ "constants-browserify": "^1.0.0",
68
+ "css-loader": "^6.7.1",
69
+ "es-module-lexer": "^1.5.0",
70
+ "express": "^4.17.3",
71
+ "fs-extra": "^11.1.0",
72
+ "magic-string": "^0.30.5",
73
+ "path-browserify": "^1.0.1",
74
+ "process": "^0.11.10",
75
+ "style-loader": "^3.3.1",
76
+ "ts-dedent": "^2.2.0",
77
+ "url": "^0.11.0",
78
+ "util": "^0.12.4",
79
+ "util-deprecate": "^1.0.2"
80
+ },
81
+ "devDependencies": {
82
+ "@types/node": "^18.0.0",
83
+ "@types/express": "^4.17.21",
84
+ "@types/fs-extra": "^11.0.4",
85
+ "@types/pretty-hrtime": "^1.0.0",
86
+ "pretty-hrtime": "^1.0.3",
87
+ "add": "^2.0.6",
88
+ "slash": "^5.0.0",
89
+ "typescript": "^5.3.2"
90
+ },
91
+ "peerDependenciesMeta": {
92
+ "typescript": {
93
+ "optional": true
94
+ }
95
+ },
96
+ "publishConfig": {
97
+ "access": "public"
98
+ },
99
+ "bundler": {
100
+ "entries": [
101
+ "./src/index.ts",
102
+ "./src/presets/custom-rsbuild-preset.ts",
103
+ "./src/preview-preset.ts",
104
+ "./src/loaders/export-order-loader.ts"
105
+ ],
106
+ "platform": "node"
107
+ },
108
+ "scripts": {
109
+ "check": "node --loader ../../scripts/node_modules/esbuild-register/loader.js -r ../../scripts/node_modules/esbuild-register/register.js ../../scripts/prepare/check.ts",
110
+ "prep": "node --loader ../../scripts/node_modules/esbuild-register/loader.js -r ../../scripts/node_modules/esbuild-register/register.js ../../scripts/prepare/bundle.ts"
111
+ }
112
+ }