@crxjs/vite-plugin 2.0.0-beta.6 → 2.0.0-beta.7

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.
Files changed (2) hide show
  1. package/dist/index.mjs +2 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -568,7 +568,7 @@ const pluginContentScripts = () => {
568
568
  async configureServer(_server) {
569
569
  server = _server;
570
570
  if (typeof preambleCode === "undefined" && server.config.plugins.some(
571
- ({ name = "none" }) => name.toLowerCase().includes("react")
571
+ ({ name = "none" }) => name.toLowerCase().includes("react") && !name.toLowerCase().includes("preact")
572
572
  )) {
573
573
  try {
574
574
  const react = await import('@vitejs/plugin-react');
@@ -806,7 +806,7 @@ const pluginDynamicContentScripts = () => {
806
806
  );
807
807
  return `${JSON.stringify(
808
808
  `/${script.loaderName ?? script.fileName}`
809
- )};`;
809
+ )}${match.split(scriptKey)[1]}`;
810
810
  }
811
811
  );
812
812
  chunk.code = replaced;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crxjs/vite-plugin",
3
- "version": "2.0.0-beta.6",
3
+ "version": "2.0.0-beta.7",
4
4
  "description": "Build Chrome Extensions with this Vite plugin.",
5
5
  "keywords": [
6
6
  "rollup-plugin",