jmapcloud-ng 1.1.16 → 1.1.17

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/vite.config.ts CHANGED
@@ -66,7 +66,8 @@ function inlineCssInLegacyBuildPlugin(isLegacyProductionBuild: boolean): Plugin
66
66
  continue
67
67
  }
68
68
 
69
- const styleId = `vite-inline-css-${output.fileName.replace(/[^a-zA-Z0-9_-]/g, "-")}`
69
+ const packageStyleNamespace = packageJSON.name.replace(/[^a-zA-Z0-9_-]/g, "-")
70
+ const styleId = `vite-inline-css-${packageStyleNamespace}-${output.fileName.replace(/[^a-zA-Z0-9_-]/g, "-")}`
70
71
  const injectionCode = `(function(){var id=${JSON.stringify(styleId)};if(document.getElementById(id)){return;}var s=document.createElement("style");s.id=id;s.appendChild(document.createTextNode(${JSON.stringify(combinedCss)}));document.head.appendChild(s);}());`
71
72
  output.code = `${injectionCode}\n${output.code}`
72
73
  }