@jxsuite/compiler 0.5.3 → 0.5.5

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/compiler.js CHANGED
@@ -296,7 +296,7 @@ ${E.join(`,
296
296
  }
297
297
  </script>
298
298
  ${q}
299
- <script type="module" src="./${U}"></script>
299
+ <script type="module" src="/${U}"></script>
300
300
  </head>
301
301
  <body>
302
302
  ${N}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jxsuite/compiler",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "Jx static HTML compiler, island detector, and site builder",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@apidevtools/json-schema-ref-parser": "^15.3.5",
40
- "@jxsuite/parser": "0.5.0",
41
- "@jxsuite/runtime": "0.5.0",
40
+ "@jxsuite/parser": "^0.5.0",
41
+ "@jxsuite/runtime": "^0.5.0",
42
42
  "remark-gfm": "^4.0.1",
43
43
  "remark-stringify": "^11.0.0",
44
44
  "unified": "^11.0.5"
@@ -512,7 +512,7 @@ function injectComponentScripts(
512
512
  // Inject CSS links in <head> for ALL components that have CSS sidecars
513
513
  const cssLinks = usedTags
514
514
  .filter((/** @type {string} */ tag) => cssMap.has(tag))
515
- .map((/** @type {string} */ tag) => `<link rel="stylesheet" href="./components/${tag}.css">`)
515
+ .map((/** @type {string} */ tag) => `<link rel="stylesheet" href="/components/${tag}.css">`)
516
516
  .join("\n ");
517
517
  if (cssLinks) {
518
518
  html = html.replace("</head>", ` ${cssLinks}\n</head>`);
@@ -534,7 +534,7 @@ function injectComponentScripts(
534
534
 
535
535
  const moduleScripts = jsTags
536
536
  .map(
537
- (/** @type {string} */ tag) => `<script type="module" src="./components/${tag}.js"></script>`,
537
+ (/** @type {string} */ tag) => `<script type="module" src="/components/${tag}.js"></script>`,
538
538
  )
539
539
  .join("\n ");
540
540
 
@@ -625,8 +625,7 @@ function injectPreRenderedComponents(html, preRendered, componentDefs) {
625
625
  function injectNpmElementScripts(html, npmElements) {
626
626
  const scripts = npmElements
627
627
  .map(
628
- (/** @type {string} */ spec) =>
629
- `<script type="module" src="./node_modules/${spec}"></script>`,
628
+ (/** @type {string} */ spec) => `<script type="module" src="/node_modules/${spec}"></script>`,
630
629
  )
631
630
  .join("\n ");
632
631
 
@@ -184,7 +184,7 @@ ${importmapEntries.join(",\n")}
184
184
  }
185
185
  </script>
186
186
  ${styleBlock}
187
- <script type="module" src="./${modulePath}"></script>
187
+ <script type="module" src="/${modulePath}"></script>
188
188
  </head>
189
189
  <body>
190
190
  ${bodyContent}