@onlook/storybook-plugin 0.3.4 → 0.3.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.
- package/dist/index.js +17 -0
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -518,6 +518,23 @@ function storybookOnlookPlugin(options = {}) {
|
|
|
518
518
|
cors: {
|
|
519
519
|
origin: allowedOrigins
|
|
520
520
|
}
|
|
521
|
+
},
|
|
522
|
+
optimizeDeps: {
|
|
523
|
+
// Collapse lucide-react's icon graph into a single prebundled chunk.
|
|
524
|
+
// Without these two directives, repos that import both `lucide-react`
|
|
525
|
+
// AND `lucide-react/dynamic` become two co-equal esbuild scan entries
|
|
526
|
+
// sharing ~5,800 icon modules — esbuild's code-splitting then shatters
|
|
527
|
+
// the shared graph per-icon, producing ~1,770 HTTP requests per iframe
|
|
528
|
+
// and tripping Chrome's URLLoader scheduler on canvases with multiple
|
|
529
|
+
// frames (net::ERR_INSUFFICIENT_RESOURCES / "Failed to fetch
|
|
530
|
+
// dynamically imported module"). Parent: ONL-832. Fix: ONL-875.
|
|
531
|
+
//
|
|
532
|
+
// `include: ['lucide-react']` pins it as a single scan entry that
|
|
533
|
+
// esbuild bundles into one chunk. `exclude: ['lucide-react/dynamic']`
|
|
534
|
+
// keeps the DynamicIcon pathway out of prebundling so it can't become
|
|
535
|
+
// a second shared-graph entry.
|
|
536
|
+
include: ["lucide-react"],
|
|
537
|
+
exclude: ["lucide-react/dynamic"]
|
|
521
538
|
}
|
|
522
539
|
};
|
|
523
540
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onlook/storybook-plugin",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"onlook-storybook": "dist/cli/index.js"
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"@types/babel__traverse": "^7.20.6",
|
|
48
48
|
"@types/node": "^22.15.32",
|
|
49
49
|
"bun-types": "^1.3.5",
|
|
50
|
+
"storybook": "^10.1.11",
|
|
50
51
|
"tsup": "^8.5.1",
|
|
51
52
|
"typescript": "5.8.3",
|
|
52
53
|
"vite": "^6.3.5"
|