@storybook/builder-vite 10.0.0 → 10.0.2
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/index.js +8 -11
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_rsu8kqkb97i from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_rsu8kqkb97i from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_rsu8kqkb97i from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_rsu8kqkb97i.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_rsu8kqkb97i.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_rsu8kqkb97i.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -9593,17 +9593,14 @@ async function getOptimizeDeps(config, options) {
|
|
|
9593
9593
|
const stories = absoluteStories.map((storyPath) => normalizePath(relative3(root, storyPath)));
|
|
9594
9594
|
const resolvedConfig = await resolveConfig(config, "serve", "development");
|
|
9595
9595
|
const resolve4 = resolvedConfig.createResolver({ asSrc: false });
|
|
9596
|
-
const include = await asyncFilter(
|
|
9597
|
-
Array.from(/* @__PURE__ */ new Set([...INCLUDE_CANDIDATES, ...extraOptimizeDeps])),
|
|
9598
|
-
async (id) => Boolean(await resolve4(id))
|
|
9599
|
-
);
|
|
9596
|
+
const include = await asyncFilter(INCLUDE_CANDIDATES, async (id) => Boolean(await resolve4(id)));
|
|
9600
9597
|
const optimizeDeps = {
|
|
9601
9598
|
...config.optimizeDeps,
|
|
9602
9599
|
// We don't need to resolve the glob since vite supports globs for entries.
|
|
9603
9600
|
entries: stories,
|
|
9604
9601
|
// We need Vite to precompile these dependencies, because they contain non-ESM code that would break
|
|
9605
9602
|
// if we served it directly to the browser.
|
|
9606
|
-
include: [...include, ...config.optimizeDeps?.include || []]
|
|
9603
|
+
include: [...include, ...extraOptimizeDeps, ...config.optimizeDeps?.include || []]
|
|
9607
9604
|
};
|
|
9608
9605
|
return optimizeDeps;
|
|
9609
9606
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/builder-vite",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2",
|
|
4
4
|
"description": "A Storybook builder to dev and build with Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"prep": "jiti ../../../scripts/build/build-package.ts"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@storybook/csf-plugin": "10.0.
|
|
51
|
+
"@storybook/csf-plugin": "10.0.2",
|
|
52
52
|
"ts-dedent": "^2.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"vite": "^7.0.4"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"storybook": "^10.0.
|
|
66
|
+
"storybook": "^10.0.2",
|
|
67
67
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
68
68
|
},
|
|
69
69
|
"publishConfig": {
|