@storybook/builder-vite 10.3.0-alpha.2 → 10.3.0-alpha.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_wtv4dr02iw from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wtv4dr02iw from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wtv4dr02iw from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wtv4dr02iw.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wtv4dr02iw.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wtv4dr02iw.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_wtv4dr02iw from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wtv4dr02iw from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wtv4dr02iw from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wtv4dr02iw.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wtv4dr02iw.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wtv4dr02iw.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
normalize,
|
|
18
18
|
relative,
|
|
19
19
|
resolve
|
|
20
|
-
} from "./_node-chunks/chunk-
|
|
20
|
+
} from "./_node-chunks/chunk-HTWDZLYG.js";
|
|
21
21
|
|
|
22
22
|
// ../../../node_modules/picocolors/picocolors.js
|
|
23
23
|
var require_picocolors = __commonJS({
|
|
@@ -1692,7 +1692,24 @@ async function build(options) {
|
|
|
1692
1692
|
}
|
|
1693
1693
|
}).build;
|
|
1694
1694
|
let finalConfig = await presets.apply("viteFinal", config, options);
|
|
1695
|
-
|
|
1695
|
+
finalConfig.plugins?.push({
|
|
1696
|
+
name: "storybook:enforce-output-dir",
|
|
1697
|
+
enforce: "post",
|
|
1698
|
+
config: (config2) => ({
|
|
1699
|
+
...config2,
|
|
1700
|
+
build: {
|
|
1701
|
+
outDir: options.outputDir
|
|
1702
|
+
}
|
|
1703
|
+
}),
|
|
1704
|
+
// configEnvironment is a new method in Vite 6
|
|
1705
|
+
// It is used to configure configs based on the environment
|
|
1706
|
+
// E.g. Nitro uses this method to set the output directory to .output/public/
|
|
1707
|
+
configEnvironment: () => ({
|
|
1708
|
+
build: {
|
|
1709
|
+
outDir: options.outputDir
|
|
1710
|
+
}
|
|
1711
|
+
})
|
|
1712
|
+
}), options.features?.developmentModeForBuild && finalConfig.plugins?.push({
|
|
1696
1713
|
name: "storybook:define-env",
|
|
1697
1714
|
config: () => ({
|
|
1698
1715
|
define: {
|
package/dist/preset.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_wtv4dr02iw from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wtv4dr02iw from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wtv4dr02iw from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wtv4dr02iw.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wtv4dr02iw.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wtv4dr02iw.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
|
normalize
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-HTWDZLYG.js";
|
|
15
15
|
|
|
16
16
|
// src/preset.ts
|
|
17
17
|
import { findConfigFile } from "storybook/internal/common";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/builder-vite",
|
|
3
|
-
"version": "10.3.0-alpha.
|
|
3
|
+
"version": "10.3.0-alpha.3",
|
|
4
4
|
"description": "A Storybook builder to dev and build with Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"!src/**/*"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@storybook/csf-plugin": "10.3.0-alpha.
|
|
49
|
+
"@storybook/csf-plugin": "10.3.0-alpha.3",
|
|
50
50
|
"ts-dedent": "^2.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"vite": "^7.0.4"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"storybook": "^10.3.0-alpha.
|
|
64
|
+
"storybook": "^10.3.0-alpha.3",
|
|
65
65
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
66
66
|
},
|
|
67
67
|
"publishConfig": {
|