vite-plugin-vanjs 0.2.3 → 0.2.4
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/package.json +1 -1
- package/server/index.mjs +2 -7
package/package.json
CHANGED
package/server/index.mjs
CHANGED
|
@@ -80,9 +80,7 @@ export function renderPreloadLinks(modules, manifest) {
|
|
|
80
80
|
const seen = new Set();
|
|
81
81
|
const ignoredAssets = new Set();
|
|
82
82
|
|
|
83
|
-
// First pass: collect all assets from ignored paths
|
|
84
|
-
// Route/layout JS stays on-demand, but their CSS is render-blocking for
|
|
85
|
-
// first paint, so it is never ignored.
|
|
83
|
+
// First pass: collect all assets from ignored paths
|
|
86
84
|
Object.entries(manifest).forEach(([id, files]) => {
|
|
87
85
|
// istanbul ignore else - don't pre-render routes, layouts and JSX stuff
|
|
88
86
|
if (
|
|
@@ -90,10 +88,7 @@ export function renderPreloadLinks(modules, manifest) {
|
|
|
90
88
|
id.includes(l)
|
|
91
89
|
)
|
|
92
90
|
) {
|
|
93
|
-
files.forEach((asset) =>
|
|
94
|
-
// istanbul ignore else
|
|
95
|
-
if (!asset.endsWith(".css")) ignoredAssets.add(asset);
|
|
96
|
-
});
|
|
91
|
+
files.forEach((asset) => ignoredAssets.add(asset));
|
|
97
92
|
}
|
|
98
93
|
});
|
|
99
94
|
|