@storybook/react-webpack5 10.1.0-alpha.10 → 10.1.0-alpha.12

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.
@@ -1,23 +1,19 @@
1
- import CJS_COMPAT_NODE_URL_t3h2tn25ynq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_t3h2tn25ynq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_t3h2tn25ynq from "node:module";
1
+ import CJS_COMPAT_NODE_URL_v0bgk296tps from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_v0bgk296tps from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_v0bgk296tps from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_t3h2tn25ynq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_t3h2tn25ynq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_t3h2tn25ynq.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_v0bgk296tps.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_v0bgk296tps.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_v0bgk296tps.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 {
13
- __name
14
- } from "../_node-chunks/chunk-BXKBAZCE.js";
15
12
 
16
13
  // src/node/index.ts
17
14
  function defineMain(config) {
18
15
  return config;
19
16
  }
20
- __name(defineMain, "defineMain");
21
17
  export {
22
18
  defineMain
23
19
  };
package/dist/preset.js CHANGED
@@ -1,52 +1,40 @@
1
- import CJS_COMPAT_NODE_URL_t3h2tn25ynq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_t3h2tn25ynq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_t3h2tn25ynq from "node:module";
1
+ import CJS_COMPAT_NODE_URL_v0bgk296tps from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_v0bgk296tps from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_v0bgk296tps from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_t3h2tn25ynq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_t3h2tn25ynq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_t3h2tn25ynq.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_v0bgk296tps.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_v0bgk296tps.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_v0bgk296tps.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 {
13
- __name
14
- } from "./_node-chunks/chunk-BXKBAZCE.js";
15
12
 
16
13
  // src/preset.ts
17
14
  import { fileURLToPath } from "node:url";
18
15
  import { WebpackDefinePlugin } from "@storybook/builder-webpack5";
19
16
  var addons = [
20
17
  fileURLToPath(import.meta.resolve("@storybook/preset-react-webpack"))
21
- ];
22
- var core = /* @__PURE__ */ __name(async (config, options) => {
23
- const framework = await options.presets.apply("framework");
18
+ ], core = async (config, options) => {
19
+ let framework = await options.presets.apply("framework");
24
20
  return {
25
21
  ...config,
26
22
  builder: {
27
23
  name: fileURLToPath(import.meta.resolve("@storybook/builder-webpack5")),
28
- options: typeof framework === "string" ? {} : framework.options.builder || {}
24
+ options: typeof framework == "string" ? {} : framework.options.builder || {}
29
25
  },
30
26
  renderer: fileURLToPath(import.meta.resolve("@storybook/react/preset"))
31
27
  };
32
- }, "core");
33
- var webpack = /* @__PURE__ */ __name(async (config, options) => {
34
- config.resolve = config.resolve || {};
35
- config.resolve.alias = {
36
- ...config.resolve?.alias,
37
- "@storybook/react": fileURLToPath(import.meta.resolve("@storybook/react"))
38
- };
39
- if (options.features?.developmentModeForBuild) {
40
- config.plugins = [
41
- // @ts-expect-error Ignore this error, because in the `webpack` preset the user actually hasn't defined a config yet.
42
- ...config.plugins,
43
- new WebpackDefinePlugin({
44
- NODE_ENV: JSON.stringify("development")
45
- })
46
- ];
47
- }
48
- return config;
49
- }, "webpack");
28
+ }, webpack = async (config, options) => (config.resolve = config.resolve || {}, config.resolve.alias = {
29
+ ...config.resolve?.alias,
30
+ "@storybook/react": fileURLToPath(import.meta.resolve("@storybook/react"))
31
+ }, options.features?.developmentModeForBuild && (config.plugins = [
32
+ // @ts-expect-error Ignore this error, because in the `webpack` preset the user actually hasn't defined a config yet.
33
+ ...config.plugins,
34
+ new WebpackDefinePlugin({
35
+ NODE_ENV: JSON.stringify("development")
36
+ })
37
+ ]), config);
50
38
  export {
51
39
  addons,
52
40
  core,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-webpack5",
3
- "version": "10.1.0-alpha.10",
3
+ "version": "10.1.0-alpha.12",
4
4
  "description": "Storybook for React and Webpack: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -50,9 +50,9 @@
50
50
  "prep": "jiti ../../../scripts/build/build-package.ts"
51
51
  },
52
52
  "dependencies": {
53
- "@storybook/builder-webpack5": "10.1.0-alpha.10",
54
- "@storybook/preset-react-webpack": "10.1.0-alpha.10",
55
- "@storybook/react": "10.1.0-alpha.10"
53
+ "@storybook/builder-webpack5": "10.1.0-alpha.12",
54
+ "@storybook/preset-react-webpack": "10.1.0-alpha.12",
55
+ "@storybook/react": "10.1.0-alpha.12"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/node": "^22.0.0"
@@ -60,7 +60,7 @@
60
60
  "peerDependencies": {
61
61
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
62
62
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
63
- "storybook": "^10.1.0-alpha.10",
63
+ "storybook": "^10.1.0-alpha.12",
64
64
  "typescript": ">= 4.9.x"
65
65
  },
66
66
  "peerDependenciesMeta": {
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae17"
74
+ "gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae1l"
75
75
  }
@@ -1,17 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_t3h2tn25ynq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_t3h2tn25ynq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_t3h2tn25ynq from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_t3h2tn25ynq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_t3h2tn25ynq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_t3h2tn25ynq.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- var __defProp = Object.defineProperty;
13
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
14
-
15
- export {
16
- __name
17
- };