@storybook/builder-webpack5 11.0.0-alpha.4 → 11.0.0-alpha.6
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-TFVPTRJI.js → chunk-2BE66XZZ.js} +6 -6
- package/dist/_node-chunks/{chunk-RVYHGSZY.js → chunk-J3UE6YWR.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 +16 -18
- package/package.json +5 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_y46u32yik6 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_y46u32yik6 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_y46u32yik6 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_y46u32yik6.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_y46u32yik6.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_y46u32yik6.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_y46u32yik6 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_y46u32yik6 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_y46u32yik6 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_y46u32yik6.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_y46u32yik6.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_y46u32yik6.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_y46u32yik6 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_y46u32yik6 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_y46u32yik6 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_y46u32yik6.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_y46u32yik6.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_y46u32yik6.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-2BE66XZZ.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-J3UE6YWR.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_y46u32yik6 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_y46u32yik6 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_y46u32yik6 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_y46u32yik6.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_y46u32yik6.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_y46u32yik6.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-J3UE6YWR.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_y46u32yik6 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_y46u32yik6 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_y46u32yik6 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_y46u32yik6.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_y46u32yik6.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_y46u32yik6.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-J3UE6YWR.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_y46u32yik6 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_y46u32yik6 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_y46u32yik6 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_y46u32yik6.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_y46u32yik6.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_y46u32yik6.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-J3UE6YWR.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_y46u32yik6 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_y46u32yik6 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_y46u32yik6 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_y46u32yik6.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_y46u32yik6.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_y46u32yik6.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-J3UE6YWR.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_y46u32yik6 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_y46u32yik6 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_y46u32yik6 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_y46u32yik6.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_y46u32yik6.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_y46u32yik6.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-2BE66XZZ.js";
|
|
15
|
+
import "../_node-chunks/chunk-J3UE6YWR.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
|
|
|
@@ -82,7 +82,8 @@ var { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin } = webpackModule
|
|
|
82
82
|
nonNormalizedStories,
|
|
83
83
|
modulesCount,
|
|
84
84
|
build,
|
|
85
|
-
tagsOptions
|
|
85
|
+
tagsOptions,
|
|
86
|
+
security
|
|
86
87
|
] = await Promise.all([
|
|
87
88
|
presets.apply("core"),
|
|
88
89
|
presets.apply("frameworkOptions"),
|
|
@@ -96,7 +97,8 @@ var { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin } = webpackModule
|
|
|
96
97
|
presets.apply("stories", []),
|
|
97
98
|
options.cache?.get("modulesCount", 1e3),
|
|
98
99
|
options.presets.apply("build"),
|
|
99
|
-
presets.apply("tags", {})
|
|
100
|
+
presets.apply("tags", {}),
|
|
101
|
+
presets.apply("security")
|
|
100
102
|
]), stories = normalizeStories(nonNormalizedStories, {
|
|
101
103
|
configDir: options.configDir,
|
|
102
104
|
workingDir
|
|
@@ -104,12 +106,7 @@ var { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin } = webpackModule
|
|
|
104
106
|
lazyCompilation: { entries: !1 }
|
|
105
107
|
} : {};
|
|
106
108
|
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
|
-
`);
|
|
109
|
+
throw new WebpackMissingPreviewTemplateError();
|
|
113
110
|
let externals = globalsNameReferenceMap;
|
|
114
111
|
build?.test?.disableBlocks && (externals["@storybook/addon-docs/blocks"] = "__STORYBOOK_BLOCKS_EMPTY_MODULE__");
|
|
115
112
|
let { virtualModules: virtualModuleMapping, entries: dynamicEntries } = await getVirtualModules(options);
|
|
@@ -164,7 +161,8 @@ var { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin } = webpackModule
|
|
|
164
161
|
})),
|
|
165
162
|
DOCS_OPTIONS: docsOptions,
|
|
166
163
|
TAGS_OPTIONS: tagsOptions,
|
|
167
|
-
...build?.test?.disableBlocks ? { __STORYBOOK_BLOCKS_EMPTY_MODULE__: {} } : {}
|
|
164
|
+
...build?.test?.disableBlocks ? { __STORYBOOK_BLOCKS_EMPTY_MODULE__: {} } : {},
|
|
165
|
+
...security?.insecureIframeMessaging ? { INSECURE_IFRAME_MESSAGING: !0 } : {}
|
|
168
166
|
},
|
|
169
167
|
headHtmlSnippet,
|
|
170
168
|
bodyHtmlSnippet
|
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.6",
|
|
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.6",
|
|
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.6"
|
|
84
83
|
},
|
|
85
84
|
"peerDependenciesMeta": {
|
|
86
85
|
"typescript": {
|