storybook-builder-rsbuild 2.1.2 → 2.1.3

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.js CHANGED
@@ -365,15 +365,7 @@ var iframe_rsbuild_config_default = async (options, extraWebpackConfig) => {
365
365
  ...storybookPaths
366
366
  }
367
367
  },
368
- // Reset `config.source.entry` field, do not use provided entry
369
- // see https://github.com/rspack-contrib/storybook-rsbuild/issues/43
370
368
  source: {
371
- entry: {
372
- main: [...entries ?? [], ...dynamicEntries]
373
- },
374
- // TODO: Rspack doesn't support virtual modules yet, use cache dir instead
375
- // we needed to explicitly set the module in `node_modules` to be compiled
376
- include: [/[\\/]node_modules[\\/].*[\\/]storybook-config-entry\.js/],
377
369
  define: {
378
370
  ...(0, import_common2.stringifyProcessEnvs)(envs),
379
371
  NODE_ENV: JSON.stringify(process.env.NODE_ENV)
@@ -508,6 +500,10 @@ var iframe_rsbuild_config_default = async (options, extraWebpackConfig) => {
508
500
  }
509
501
  }
510
502
  });
503
+ rsbuildConfig.source ??= {};
504
+ rsbuildConfig.source.entry = {
505
+ main: [...entries ?? [], ...dynamicEntries]
506
+ };
511
507
  return rsbuildConfig;
512
508
  };
513
509
 
@@ -538,7 +534,7 @@ var getIsReactVersion18or19 = async (options) => {
538
534
  var applyReactShims = async (config, options) => {
539
535
  const isReactVersion18 = await getIsReactVersion18or19(options);
540
536
  if (isReactVersion18) {
541
- return void 0;
537
+ return {};
542
538
  }
543
539
  return {
544
540
  resolve: {
package/dist/index.mjs CHANGED
@@ -314,15 +314,7 @@ var iframe_rsbuild_config_default = async (options, extraWebpackConfig) => {
314
314
  ...storybookPaths
315
315
  }
316
316
  },
317
- // Reset `config.source.entry` field, do not use provided entry
318
- // see https://github.com/rspack-contrib/storybook-rsbuild/issues/43
319
317
  source: {
320
- entry: {
321
- main: [...entries ?? [], ...dynamicEntries]
322
- },
323
- // TODO: Rspack doesn't support virtual modules yet, use cache dir instead
324
- // we needed to explicitly set the module in `node_modules` to be compiled
325
- include: [/[\\/]node_modules[\\/].*[\\/]storybook-config-entry\.js/],
326
318
  define: {
327
319
  ...stringifyProcessEnvs(envs),
328
320
  NODE_ENV: JSON.stringify(process.env.NODE_ENV)
@@ -459,6 +451,10 @@ var iframe_rsbuild_config_default = async (options, extraWebpackConfig) => {
459
451
  }
460
452
  }
461
453
  });
454
+ rsbuildConfig.source ??= {};
455
+ rsbuildConfig.source.entry = {
456
+ main: [...entries ?? [], ...dynamicEntries]
457
+ };
462
458
  return rsbuildConfig;
463
459
  };
464
460
  var getIsReactVersion18or19 = async (options) => {
@@ -485,7 +481,7 @@ var getIsReactVersion18or19 = async (options) => {
485
481
  var applyReactShims = async (config, options) => {
486
482
  const isReactVersion18 = await getIsReactVersion18or19(options);
487
483
  if (isReactVersion18) {
488
- return void 0;
484
+ return {};
489
485
  }
490
486
  return {
491
487
  resolve: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook-builder-rsbuild",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "Rsbuild builder for Storybook",
5
5
  "keywords": [
6
6
  "storybook",
@@ -58,15 +58,15 @@
58
58
  ],
59
59
  "dependencies": {
60
60
  "@rsbuild/plugin-type-check": "^1.2.4",
61
- "@storybook/addon-docs": "^9.1.7",
62
- "@storybook/core-webpack": "^9.1.7",
61
+ "@storybook/addon-docs": "^9.1.15",
62
+ "@storybook/core-webpack": "^9.1.15",
63
63
  "browser-assert": "^1.2.1",
64
64
  "case-sensitive-paths-webpack-plugin": "^2.4.0",
65
65
  "cjs-module-lexer": "^1.4.3",
66
66
  "constants-browserify": "^1.0.0",
67
67
  "es-module-lexer": "^1.7.0",
68
68
  "fs-extra": "^11.3.2",
69
- "magic-string": "^0.30.19",
69
+ "magic-string": "^0.30.21",
70
70
  "path-browserify": "^1.0.1",
71
71
  "process": "^0.11.10",
72
72
  "rsbuild-plugin-html-minifier-terser": "^1.1.2",
@@ -77,7 +77,7 @@
77
77
  "util-deprecate": "^1.0.2"
78
78
  },
79
79
  "devDependencies": {
80
- "@rsbuild/core": "^1.5.11",
80
+ "@rsbuild/core": "^1.5.17",
81
81
  "@types/find-cache-dir": "^5.0.2",
82
82
  "@types/fs-extra": "^11.0.4",
83
83
  "@types/node": "^18.19.110",
@@ -85,8 +85,8 @@
85
85
  "find-cache-dir": "^5.0.0",
86
86
  "pretty-hrtime": "^1.0.3",
87
87
  "slash": "^5.1.0",
88
- "storybook": "9.1.5",
89
- "typescript": "^5.9.2"
88
+ "storybook": "9.1.10",
89
+ "typescript": "^5.9.3"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "@rsbuild/core": "^1.5.0",