@storybook/builder-vite 11.0.0-alpha.5 → 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.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_zwca6w95nf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_zwca6w95nf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_zwca6w95nf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_zwca6w95nf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_zwca6w95nf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_zwca6w95nf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -2068,14 +2068,15 @@ async function generateAddonSetupCode() {
|
|
|
2068
2068
|
// src/transform-iframe-html.ts
|
|
2069
2069
|
import { normalizeStories } from "storybook/internal/common";
|
|
2070
2070
|
async function transformIframeHtml(html, options) {
|
|
2071
|
-
let { configType, features, presets } = options, build = 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), {
|
|
2071
|
+
let { configType, features, presets } = options, build = 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), {
|
|
2072
2072
|
configDir: options.configDir,
|
|
2073
2073
|
workingDir: process.cwd()
|
|
2074
2074
|
}).map((specifier) => ({
|
|
2075
2075
|
...specifier,
|
|
2076
2076
|
importPathMatcher: specifier.importPathMatcher.source
|
|
2077
2077
|
})), otherGlobals = {
|
|
2078
|
-
...build?.test?.disableBlocks ? { __STORYBOOK_BLOCKS_EMPTY_MODULE__: {} } : {}
|
|
2078
|
+
...build?.test?.disableBlocks ? { __STORYBOOK_BLOCKS_EMPTY_MODULE__: {} } : {},
|
|
2079
|
+
...security?.insecureIframeMessaging ? { INSECURE_IFRAME_MESSAGING: !0 } : {}
|
|
2079
2080
|
}, transformedHtml = html.replace("[CONFIG_TYPE HERE]", configType || "").replace("[LOGLEVEL HERE]", logLevel || "").replace("'[FRAMEWORK_OPTIONS HERE]'", JSON.stringify(frameworkOptions)).replace(
|
|
2080
2081
|
"('OTHER_GLOBALS HERE');",
|
|
2081
2082
|
Object.entries(otherGlobals).map(([k, v]) => `window["${k}"] = ${JSON.stringify(v)};`).join("")
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_zwca6w95nf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_zwca6w95nf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_zwca6w95nf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_zwca6w95nf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_zwca6w95nf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_zwca6w95nf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
bundlerOptionsKey,
|
|
16
16
|
commonConfig,
|
|
17
17
|
normalize
|
|
18
|
-
} from "./_node-chunks/chunk-
|
|
18
|
+
} from "./_node-chunks/chunk-TTIQ3XRQ.js";
|
|
19
19
|
|
|
20
20
|
// ../../../node_modules/picocolors/picocolors.js
|
|
21
21
|
var require_picocolors = __commonJS({
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_zwca6w95nf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_zwca6w95nf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_zwca6w95nf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_zwca6w95nf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_zwca6w95nf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_zwca6w95nf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
optimizeViteDeps,
|
|
14
14
|
staticDirs,
|
|
15
15
|
viteCorePlugins
|
|
16
|
-
} from "./_node-chunks/chunk-
|
|
16
|
+
} from "./_node-chunks/chunk-TTIQ3XRQ.js";
|
|
17
17
|
export {
|
|
18
18
|
optimizeViteDeps,
|
|
19
19
|
staticDirs,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/builder-vite",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.6",
|
|
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": "^11.0.0-alpha.
|
|
64
|
+
"storybook": "^11.0.0-alpha.6",
|
|
65
65
|
"vite": "^6.3.0 || ^7.0.0 || ^8.0.0"
|
|
66
66
|
},
|
|
67
67
|
"publishConfig": {
|