@storybook/builder-vite 10.3.0-alpha.14 → 10.3.0-alpha.15
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_dxkmre9ujad from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_dxkmre9ujad from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_dxkmre9ujad from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_dxkmre9ujad.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_dxkmre9ujad.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_dxkmre9ujad.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -160,6 +160,9 @@ function getUniqueImportPaths(index) {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
// src/plugins/storybook-optimize-deps-plugin.ts
|
|
163
|
+
function escapeGlobPath(filePath) {
|
|
164
|
+
return filePath.replace(/[()[\]{}!*?|+@]/g, "\\$&");
|
|
165
|
+
}
|
|
163
166
|
function storybookOptimizeDepsPlugin(options) {
|
|
164
167
|
return {
|
|
165
168
|
name: "storybook:optimize-deps-plugin",
|
|
@@ -176,10 +179,12 @@ function storybookOptimizeDepsPlugin(options) {
|
|
|
176
179
|
// Story files + preview annotation files as entry points for the dep optimizer.
|
|
177
180
|
// Vite will crawl these to discover all transitive CJS dependencies that need
|
|
178
181
|
// pre-bundling, removing the need for a hard-coded include list.
|
|
182
|
+
// Paths are escaped so that special glob characters (e.g. parentheses in Next.js route
|
|
183
|
+
// group directories) are treated as literal characters, not glob syntax.
|
|
179
184
|
entries: [
|
|
180
185
|
...typeof config.optimizeDeps?.entries == "string" ? [config.optimizeDeps.entries] : config.optimizeDeps?.entries ?? [],
|
|
181
|
-
...getUniqueImportPaths(index),
|
|
182
|
-
...previewAnnotationEntries
|
|
186
|
+
...getUniqueImportPaths(index).map(escapeGlobPath),
|
|
187
|
+
...previewAnnotationEntries.map(escapeGlobPath)
|
|
183
188
|
],
|
|
184
189
|
// Extra deps explicitly included by Storybook presets (e.g. framework-specific packages).
|
|
185
190
|
include: [...extraOptimizeDeps, ...config.optimizeDeps?.include ?? []]
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_dxkmre9ujad from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_dxkmre9ujad from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_dxkmre9ujad from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_dxkmre9ujad.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_dxkmre9ujad.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_dxkmre9ujad.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-6TDQA4AZ.js";
|
|
28
28
|
|
|
29
29
|
// ../../../node_modules/picocolors/picocolors.js
|
|
30
30
|
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_dxkmre9ujad from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_dxkmre9ujad from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_dxkmre9ujad from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_dxkmre9ujad.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_dxkmre9ujad.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_dxkmre9ujad.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_e2d3ehe95oc.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
optimizeViteDeps,
|
|
14
14
|
viteCorePlugins
|
|
15
|
-
} from "./_node-chunks/chunk-
|
|
15
|
+
} from "./_node-chunks/chunk-6TDQA4AZ.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.3.0-alpha.
|
|
3
|
+
"version": "10.3.0-alpha.15",
|
|
4
4
|
"description": "A Storybook builder to dev and build with Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"!src/**/*"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@storybook/csf-plugin": "10.3.0-alpha.
|
|
50
|
+
"@storybook/csf-plugin": "10.3.0-alpha.15",
|
|
51
51
|
"ts-dedent": "^2.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"vite": "^7.0.4"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"storybook": "^10.3.0-alpha.
|
|
65
|
+
"storybook": "^10.3.0-alpha.15",
|
|
66
66
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
67
67
|
},
|
|
68
68
|
"publishConfig": {
|