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 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 || isReferencedScript || type?.value === "importmap")
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-bundle",
3
- "version": "6.2.1",
3
+ "version": "6.2.2",
4
4
  "description": "A very simple bundler for HTML SFC",
5
5
  "bin": "./dist/bundle.mjs",
6
6
  "main": "./dist/bundle.mjs",
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 (!scriptContent || isReferencedScript || type?.value === "importmap")
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`);