@storybook/builder-vite 10.6.1 → 10.6.3
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,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_yls6gv0am0f from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_yls6gv0am0f from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_yls6gv0am0f from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_yls6gv0am0f.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_yls6gv0am0f.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_yls6gv0am0f.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,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_yls6gv0am0f from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_yls6gv0am0f from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_yls6gv0am0f from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_yls6gv0am0f.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_yls6gv0am0f.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_yls6gv0am0f.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
normalize,
|
|
25
25
|
relative,
|
|
26
26
|
viteCorePlugins
|
|
27
|
-
} from "./_node-chunks/chunk-
|
|
27
|
+
} from "./_node-chunks/chunk-RQWELROP.js";
|
|
28
28
|
|
|
29
29
|
// ../../../node_modules/picocolors/picocolors.js
|
|
30
30
|
var require_picocolors = __commonJS({
|
|
@@ -370,14 +370,15 @@ async function generateAddonSetupCode() {
|
|
|
370
370
|
// src/transform-iframe-html.ts
|
|
371
371
|
import { normalizeStories } from "storybook/internal/common";
|
|
372
372
|
async function transformIframeHtml(html, options) {
|
|
373
|
-
let { configType, features, presets } = options, build3 = await presets.apply("build"), frameworkOptions = await presets.apply("frameworkOptions"), headHtmlSnippet = await presets.apply("previewHead"), bodyHtmlSnippet = await presets.apply("previewBody"), logLevel = await presets.apply("logLevel", void 0), docsOptions = await presets.apply("docs"), tagsOptions = await presets.apply("tags"), coreOptions = await presets.apply("core"), stories = normalizeStories(await options.presets.apply("stories", [], options), {
|
|
373
|
+
let { configType, features, presets } = options, build3 = await presets.apply("build"), frameworkOptions = await presets.apply("frameworkOptions"), headHtmlSnippet = await presets.apply("previewHead"), bodyHtmlSnippet = await presets.apply("previewBody"), logLevel = await presets.apply("logLevel", void 0), docsOptions = await presets.apply("docs"), tagsOptions = await presets.apply("tags"), security = await presets.apply("security"), coreOptions = await presets.apply("core"), stories = normalizeStories(await options.presets.apply("stories", [], options), {
|
|
374
374
|
configDir: options.configDir,
|
|
375
375
|
workingDir: process.cwd()
|
|
376
376
|
}).map((specifier) => ({
|
|
377
377
|
...specifier,
|
|
378
378
|
importPathMatcher: specifier.importPathMatcher.source
|
|
379
379
|
})), otherGlobals = {
|
|
380
|
-
...build3?.test?.disableBlocks ? { __STORYBOOK_BLOCKS_EMPTY_MODULE__: {} } : {}
|
|
380
|
+
...build3?.test?.disableBlocks ? { __STORYBOOK_BLOCKS_EMPTY_MODULE__: {} } : {},
|
|
381
|
+
...security?.insecureIframeMessaging ? { INSECURE_IFRAME_MESSAGING: !0 } : {}
|
|
381
382
|
}, transformedHtml = html.replace("[CONFIG_TYPE HERE]", configType || "").replace("[LOGLEVEL HERE]", logLevel || "").replace("'[FRAMEWORK_OPTIONS HERE]'", JSON.stringify(frameworkOptions)).replace(
|
|
382
383
|
"('OTHER_GLOBALS HERE');",
|
|
383
384
|
Object.entries(otherGlobals).map(([k, v]) => `window["${k}"] = ${JSON.stringify(v)};`).join("")
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_yls6gv0am0f from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_yls6gv0am0f from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_yls6gv0am0f from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_yls6gv0am0f.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_yls6gv0am0f.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_yls6gv0am0f.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_5mkvsps06a7.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
optimizeViteDeps,
|
|
14
14
|
viteCorePlugins
|
|
15
|
-
} from "./_node-chunks/chunk-
|
|
15
|
+
} from "./_node-chunks/chunk-RQWELROP.js";
|
|
16
16
|
export {
|
|
17
17
|
optimizeViteDeps,
|
|
18
18
|
viteCorePlugins
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/builder-vite",
|
|
3
|
-
"version": "10.6.
|
|
3
|
+
"version": "10.6.3",
|
|
4
4
|
"description": "A Storybook builder to dev and build with Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"vite": "^7.0.4"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"storybook": "^10.6.
|
|
64
|
+
"storybook": "^10.6.3",
|
|
65
65
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
66
66
|
},
|
|
67
67
|
"publishConfig": {
|