@storybook/builder-webpack5 11.0.0-alpha.3 → 11.0.0-alpha.5
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-chunks/{chunk-MTWD2IWD.js → chunk-PT3I4HOB.js} +6 -6
- package/dist/_node-chunks/{chunk-H6ORI6VT.js → chunk-SZSDL5ID.js} +6 -6
- package/dist/index.js +8 -8
- package/dist/loaders/export-order-loader.js +7 -7
- package/dist/loaders/storybook-mock-transform-loader.js +7 -7
- package/dist/loaders/webpack-automock-loader.js +7 -7
- package/dist/presets/custom-webpack-preset.js +7 -7
- package/dist/presets/preview-preset.js +10 -15
- package/package.json +5 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_turs6qy0xr from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_turs6qy0xr from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_turs6qy0xr from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_turs6qy0xr.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_turs6qy0xr.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_turs6qy0xr.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_turs6qy0xr from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_turs6qy0xr from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_turs6qy0xr from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_turs6qy0xr.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_turs6qy0xr.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_turs6qy0xr.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_turs6qy0xr from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_turs6qy0xr from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_turs6qy0xr from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_turs6qy0xr.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_turs6qy0xr.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_turs6qy0xr.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
getVirtualModules
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-PT3I4HOB.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__esm,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
__require,
|
|
20
20
|
__toCommonJS,
|
|
21
21
|
__toESM
|
|
22
|
-
} from "./_node-chunks/chunk-
|
|
22
|
+
} from "./_node-chunks/chunk-SZSDL5ID.js";
|
|
23
23
|
|
|
24
24
|
// ../../../node_modules/pretty-hrtime/index.js
|
|
25
25
|
var require_pretty_hrtime = __commonJS({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_turs6qy0xr from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_turs6qy0xr from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_turs6qy0xr from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_turs6qy0xr.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_turs6qy0xr.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_turs6qy0xr.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 "../_node-chunks/chunk-
|
|
12
|
+
import "../_node-chunks/chunk-SZSDL5ID.js";
|
|
13
13
|
|
|
14
14
|
// src/loaders/export-order-loader.ts
|
|
15
15
|
import assert from "node:assert";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_turs6qy0xr from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_turs6qy0xr from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_turs6qy0xr from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_turs6qy0xr.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_turs6qy0xr.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_turs6qy0xr.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 "../_node-chunks/chunk-
|
|
12
|
+
import "../_node-chunks/chunk-SZSDL5ID.js";
|
|
13
13
|
|
|
14
14
|
// src/loaders/storybook-mock-transform-loader.ts
|
|
15
15
|
import { rewriteSbMockImportCalls } from "storybook/internal/mocking-utils";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_turs6qy0xr from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_turs6qy0xr from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_turs6qy0xr from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_turs6qy0xr.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_turs6qy0xr.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_turs6qy0xr.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 "../_node-chunks/chunk-
|
|
12
|
+
import "../_node-chunks/chunk-SZSDL5ID.js";
|
|
13
13
|
|
|
14
14
|
// src/loaders/webpack-automock-loader.ts
|
|
15
15
|
import { babelParser, getAutomockCode } from "storybook/internal/mocking-utils";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_turs6qy0xr from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_turs6qy0xr from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_turs6qy0xr from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_turs6qy0xr.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_turs6qy0xr.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_turs6qy0xr.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__require
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-SZSDL5ID.js";
|
|
15
15
|
|
|
16
16
|
// src/presets/custom-webpack-preset.ts
|
|
17
17
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_turs6qy0xr from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_turs6qy0xr from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_turs6qy0xr from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_turs6qy0xr.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_turs6qy0xr.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_turs6qy0xr.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
getVirtualModules
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
15
|
-
import "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-PT3I4HOB.js";
|
|
15
|
+
import "../_node-chunks/chunk-SZSDL5ID.js";
|
|
16
16
|
|
|
17
17
|
// src/presets/preview-preset.ts
|
|
18
18
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
stringifyProcessEnvs
|
|
28
28
|
} from "storybook/internal/common";
|
|
29
29
|
import { globalsNameReferenceMap } from "storybook/internal/preview/globals";
|
|
30
|
+
import { WebpackMissingPreviewTemplateError } from "storybook/internal/server-errors";
|
|
30
31
|
import CaseSensitivePathsPlugin from "case-sensitive-paths-webpack-plugin";
|
|
31
32
|
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
|
|
32
33
|
import HtmlWebpackPlugin from "html-webpack-plugin";
|
|
33
34
|
import TerserWebpackPlugin from "terser-webpack-plugin";
|
|
34
|
-
import { dedent } from "ts-dedent";
|
|
35
35
|
import webpackModule from "webpack";
|
|
36
36
|
import VirtualModulePlugin from "webpack-virtual-modules";
|
|
37
37
|
|
|
@@ -104,12 +104,7 @@ var { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin } = webpackModule
|
|
|
104
104
|
lazyCompilation: { entries: !1 }
|
|
105
105
|
} : {};
|
|
106
106
|
if (!template)
|
|
107
|
-
throw new
|
|
108
|
-
Storybook's Webpack5 builder requires a template to be specified.
|
|
109
|
-
Somehow you've ended up with a falsy value for the template option.
|
|
110
|
-
|
|
111
|
-
Please file an issue at https://github.com/storybookjs/storybook with a reproduction.
|
|
112
|
-
`);
|
|
107
|
+
throw new WebpackMissingPreviewTemplateError();
|
|
113
108
|
let externals = globalsNameReferenceMap;
|
|
114
109
|
build?.test?.disableBlocks && (externals["@storybook/addon-docs/blocks"] = "__STORYBOOK_BLOCKS_EMPTY_MODULE__");
|
|
115
110
|
let { virtualModules: virtualModuleMapping, entries: dynamicEntries } = await getVirtualModules(options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/builder-webpack5",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.5",
|
|
4
4
|
"description": "A Storybook builder to dev and build with Webpack",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"!src/**/*"
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@storybook/core-webpack": "11.0.0-alpha.
|
|
55
|
+
"@storybook/core-webpack": "11.0.0-alpha.5",
|
|
56
56
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
57
57
|
"cjs-module-lexer": "^1.2.3",
|
|
58
58
|
"css-loader": "^7.1.2",
|
|
@@ -63,9 +63,8 @@
|
|
|
63
63
|
"semver": "^7.7.3",
|
|
64
64
|
"style-loader": "^4.0.0",
|
|
65
65
|
"terser-webpack-plugin": "^5.3.17",
|
|
66
|
-
"
|
|
67
|
-
"webpack": "
|
|
68
|
-
"webpack-dev-middleware": "^6.1.2",
|
|
66
|
+
"webpack": "^5.101.0",
|
|
67
|
+
"webpack-dev-middleware": "^8.3.0",
|
|
69
68
|
"webpack-hot-middleware": "^2.25.1",
|
|
70
69
|
"webpack-virtual-modules": "^0.6.0"
|
|
71
70
|
},
|
|
@@ -80,7 +79,7 @@
|
|
|
80
79
|
"typescript": "^6.0.3"
|
|
81
80
|
},
|
|
82
81
|
"peerDependencies": {
|
|
83
|
-
"storybook": "^11.0.0-alpha.
|
|
82
|
+
"storybook": "^11.0.0-alpha.5"
|
|
84
83
|
},
|
|
85
84
|
"peerDependenciesMeta": {
|
|
86
85
|
"typescript": {
|