@modern-js/storybook-builder 0.0.0-next-20231127080907 → 0.0.0-next-20231127085256

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.
@@ -346,18 +346,16 @@ function addonAdapter(api, options) {
346
346
  const getOptions = (plugin) => Array.isArray(plugin) ? plugin[1] : null;
347
347
  const replaceOrInsert = (plugin, plugins) => {
348
348
  const pluginName = getPluginName(plugin);
349
- const append = [];
350
349
  for (let i = 0; i < plugins.length; i++) {
351
350
  if (getPluginName(plugins[i]) === pluginName) {
352
351
  if (getOptions(plugin)) {
353
352
  import_utils.logger.info(`Detected duplicated babel plugin or presets: ${pluginName}, overrides with the new one`);
354
353
  plugins[i] = plugin;
355
354
  }
356
- } else {
357
- append.push(plugin);
355
+ return;
358
356
  }
359
357
  }
360
- plugins.push(...append);
358
+ plugins.push(plugin);
361
359
  };
362
360
  const currentPlugins = config.plugins || [];
363
361
  const currentPresets = config.presets || [];
@@ -365,7 +365,6 @@ function addonAdapter(api, options) {
365
365
  const getOptions = (plugin) => Array.isArray(plugin) ? plugin[1] : null;
366
366
  const replaceOrInsert = (plugin, plugins) => {
367
367
  const pluginName = getPluginName(plugin);
368
- const append = [];
369
368
  for (let i = 0; i < plugins.length; i++) {
370
369
  if (getPluginName(plugins[i]) === pluginName) {
371
370
  if (getOptions(plugin)) {
@@ -374,11 +373,10 @@ function addonAdapter(api, options) {
374
373
  );
375
374
  plugins[i] = plugin;
376
375
  }
377
- } else {
378
- append.push(plugin);
376
+ return;
379
377
  }
380
378
  }
381
- plugins.push(...append);
379
+ plugins.push(plugin);
382
380
  };
383
381
  const currentPlugins = config.plugins || [];
384
382
  const currentPresets = config.presets || [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/storybook-builder",
3
- "version": "0.0.0-next-20231127080907",
3
+ "version": "0.0.0-next-20231127085256",
4
4
  "description": "modern.js support for storybook",
5
5
  "repository": {
6
6
  "type": "git",
@@ -71,11 +71,11 @@
71
71
  "serve-static": "^1.14.1",
72
72
  "tinypool": "^0.8.0",
73
73
  "webpack-hot-middleware": "^2.25.4",
74
- "@modern-js/builder": "0.0.0-next-20231127080907",
75
- "@modern-js/core": "0.0.0-next-20231127080907",
76
- "@modern-js/builder-shared": "0.0.0-next-20231127080907",
77
- "@modern-js/utils": "0.0.0-next-20231127080907",
78
- "@modern-js/runtime": "0.0.0-next-20231127080907"
74
+ "@modern-js/builder": "0.0.0-next-20231127085256",
75
+ "@modern-js/core": "0.0.0-next-20231127085256",
76
+ "@modern-js/runtime": "0.0.0-next-20231127085256",
77
+ "@modern-js/utils": "0.0.0-next-20231127085256",
78
+ "@modern-js/builder-shared": "0.0.0-next-20231127085256"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@storybook/types": "^7.5.1",
@@ -83,14 +83,14 @@
83
83
  "@types/serve-static": "^1.13.10",
84
84
  "@types/webpack-hot-middleware": "^2.25.6",
85
85
  "typescript": "^5.2.2",
86
- "@modern-js/builder-rspack-provider": "0.0.0-next-20231127080907",
87
- "@modern-js/builder-webpack-provider": "0.0.0-next-20231127080907",
88
- "@scripts/build": "0.0.0-next-20231127080907",
89
- "@modern-js/core": "0.0.0-next-20231127080907"
86
+ "@modern-js/builder-rspack-provider": "0.0.0-next-20231127085256",
87
+ "@modern-js/builder-webpack-provider": "0.0.0-next-20231127085256",
88
+ "@modern-js/core": "0.0.0-next-20231127085256",
89
+ "@scripts/build": "0.0.0-next-20231127085256"
90
90
  },
91
91
  "peerDependencies": {
92
- "@modern-js/builder-webpack-provider": "0.0.0-next-20231127080907",
93
- "@modern-js/builder-rspack-provider": "0.0.0-next-20231127080907"
92
+ "@modern-js/builder-webpack-provider": "0.0.0-next-20231127085256",
93
+ "@modern-js/builder-rspack-provider": "0.0.0-next-20231127085256"
94
94
  },
95
95
  "peerDependenciesMeta": {
96
96
  "@modern-js/builder-webpack-provider": {