@storybook/react-webpack5 10.1.0-alpha.8 → 10.1.0-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.
- package/dist/node/index.js +6 -10
- package/dist/preset.js +19 -31
- package/package.json +6 -6
- package/dist/_node-chunks/chunk-XGHAL5LV.js +0 -17
package/dist/node/index.js
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_qtb3mqh33sl from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_qtb3mqh33sl from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_qtb3mqh33sl from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_qtb3mqh33sl.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_qtb3mqh33sl.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_qtb3mqh33sl.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-XGHAL5LV.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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_qtb3mqh33sl from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_qtb3mqh33sl from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_qtb3mqh33sl from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_qtb3mqh33sl.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_qtb3mqh33sl.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_qtb3mqh33sl.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-XGHAL5LV.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
|
-
|
|
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
|
|
24
|
+
options: typeof framework == "string" ? {} : framework.options.builder || {}
|
|
29
25
|
},
|
|
30
26
|
renderer: fileURLToPath(import.meta.resolve("@storybook/react/preset"))
|
|
31
27
|
};
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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-
|
|
3
|
+
"version": "10.1.0-beta.0",
|
|
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-
|
|
54
|
-
"@storybook/preset-react-webpack": "10.1.0-
|
|
55
|
-
"@storybook/react": "10.1.0-
|
|
53
|
+
"@storybook/builder-webpack5": "10.1.0-beta.0",
|
|
54
|
+
"@storybook/preset-react-webpack": "10.1.0-beta.0",
|
|
55
|
+
"@storybook/react": "10.1.0-beta.0"
|
|
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-
|
|
63
|
+
"storybook": "^10.1.0-beta.0",
|
|
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": "
|
|
74
|
+
"gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae1l"
|
|
75
75
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_czh4tlwmpou from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_czh4tlwmpou from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_czh4tlwmpou from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_czh4tlwmpou.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_czh4tlwmpou.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_czh4tlwmpou.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
|
-
};
|