html-bundle 6.2.1 → 6.2.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/bundle.mjs +4 -1
- package/package.json +1 -1
- package/src/bundle.mts +6 -1
package/dist/bundle.mjs
CHANGED
|
@@ -258,7 +258,10 @@ async function writeInlineScripts(file) {
|
|
|
258
258
|
const isReferencedScript = script.attrs.find((a) => a.name === "src");
|
|
259
259
|
const type = script.attrs.find((a) => a.name === "type");
|
|
260
260
|
const scriptContent = scriptTextNode?.value;
|
|
261
|
-
if (!scriptContent ||
|
|
261
|
+
if (!scriptContent ||
|
|
262
|
+
isReferencedScript ||
|
|
263
|
+
type?.value === "importmap" ||
|
|
264
|
+
type?.value === "application/ld+json")
|
|
262
265
|
continue;
|
|
263
266
|
const jsFile = file.replace(".html", `-bundle-${index}.tsx`);
|
|
264
267
|
inlineFiles.add(jsFile);
|
package/package.json
CHANGED
package/src/bundle.mts
CHANGED
|
@@ -309,7 +309,12 @@ async function writeInlineScripts(file: string) {
|
|
|
309
309
|
);
|
|
310
310
|
const type = script.attrs.find((a: { name: string }) => a.name === "type");
|
|
311
311
|
const scriptContent = scriptTextNode?.value;
|
|
312
|
-
if (
|
|
312
|
+
if (
|
|
313
|
+
!scriptContent ||
|
|
314
|
+
isReferencedScript ||
|
|
315
|
+
type?.value === "importmap" ||
|
|
316
|
+
type?.value === "application/ld+json"
|
|
317
|
+
)
|
|
313
318
|
continue;
|
|
314
319
|
|
|
315
320
|
const jsFile = file.replace(".html", `-bundle-${index}.tsx`);
|