@crxjs/vite-plugin 1.0.10 → 1.0.11

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @crxjs/vite-plugin
2
2
 
3
+ ## 1.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - dc479d1: Fix global constant replacement in background
8
+
3
9
  ## 1.0.10
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -3512,7 +3512,9 @@ const pluginBackground = () => {
3512
3512
  if (this.meta.watchMode) {
3513
3513
  if (typeof port === "undefined")
3514
3514
  throw new Error("server port is undefined in watch mode");
3515
- loader = `import 'http://localhost:${port}${workerClientId}';
3515
+ loader = `import 'http:/localhost:${port}/@vite/env';
3516
+ `;
3517
+ loader += `import 'http://localhost:${port}${workerClientId}';
3516
3518
  `;
3517
3519
  if (worker)
3518
3520
  loader += `import 'http://localhost:${port}/${worker}';
package/dist/index.mjs CHANGED
@@ -3479,7 +3479,9 @@ const pluginBackground = () => {
3479
3479
  if (this.meta.watchMode) {
3480
3480
  if (typeof port === "undefined")
3481
3481
  throw new Error("server port is undefined in watch mode");
3482
- loader = `import 'http://localhost:${port}${workerClientId}';
3482
+ loader = `import 'http:/localhost:${port}/@vite/env';
3483
+ `;
3484
+ loader += `import 'http://localhost:${port}${workerClientId}';
3483
3485
  `;
3484
3486
  if (worker)
3485
3487
  loader += `import 'http://localhost:${port}/${worker}';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crxjs/vite-plugin",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Build Chrome Extensions with this Vite plugin.",
5
5
  "keywords": [
6
6
  "rollup-plugin",