@base44-preview/vite-plugin 1.0.33-pr.104.c53909c → 1.0.34-pr.117.4436a80

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.
@@ -1 +1 @@
1
- {"version":3,"file":"error-overlay-plugin.d.ts","sourceRoot":"","sources":["../src/error-overlay-plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,wBAAgB,kBAAkB,IAc3B,MAAM,CACZ"}
1
+ {"version":3,"file":"error-overlay-plugin.d.ts","sourceRoot":"","sources":["../src/error-overlay-plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,wBAAgB,kBAAkB,IAqB3B,MAAM,CACZ"}
@@ -8,7 +8,13 @@ export function errorOverlayPlugin() {
8
8
  return;
9
9
  if (!id.includes("vite/dist/client/client.mjs"))
10
10
  return;
11
- return code.replace("class ErrorOverlay", errorOverlayCode + "\nclass OldErrorOverlay");
11
+ // Vite <=6 emits `class ErrorOverlay extends HTMLElement`, Vite >=7
12
+ // `var ErrorOverlay = class extends HTMLElement`. Missing a shape is
13
+ // silent — replace() just returns the input, and Vite's own red overlay
14
+ // stays registered.
15
+ return code.replace(/class ErrorOverlay(?= extends)|\b(var |let |const )ErrorOverlay(?= = class)/, (_match, declaration) => errorOverlayCode +
16
+ "\n" +
17
+ (declaration ? `${declaration}OldErrorOverlay` : "class OldErrorOverlay"));
12
18
  },
13
19
  };
14
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"error-overlay-plugin.js","sourceRoot":"","sources":["../src/error-overlay-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGrD,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,aAAa;QAChD,SAAS,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,EAAE;YAC3B,IAAI,IAAI,EAAE,GAAG;gBAAE,OAAO;YAEtB,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;gBAAE,OAAO;YAExD,OAAO,IAAI,CAAC,OAAO,CACjB,oBAAoB,EACpB,gBAAgB,GAAG,yBAAyB,CAC7C,CAAC;QACJ,CAAC;KACQ,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"error-overlay-plugin.js","sourceRoot":"","sources":["../src/error-overlay-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGrD,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,aAAa;QAChD,SAAS,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,EAAE;YAC3B,IAAI,IAAI,EAAE,GAAG;gBAAE,OAAO;YAEtB,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;gBAAE,OAAO;YAExD,oEAAoE;YACpE,qEAAqE;YACrE,wEAAwE;YACxE,oBAAoB;YACpB,OAAO,IAAI,CAAC,OAAO,CACjB,6EAA6E,EAC7E,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,CACtB,gBAAgB;gBAChB,IAAI;gBACJ,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,iBAAiB,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAC5E,CAAC;QACJ,CAAC;KACQ,CAAC;AACd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/vite-plugin",
3
- "version": "1.0.33-pr.104.c53909c",
3
+ "version": "1.0.34-pr.117.4436a80",
4
4
  "description": "The Vite plugin for base44 based applications",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -10,9 +10,16 @@ export function errorOverlayPlugin() {
10
10
 
11
11
  if (!id.includes("vite/dist/client/client.mjs")) return;
12
12
 
13
+ // Vite <=6 emits `class ErrorOverlay extends HTMLElement`, Vite >=7
14
+ // `var ErrorOverlay = class extends HTMLElement`. Missing a shape is
15
+ // silent — replace() just returns the input, and Vite's own red overlay
16
+ // stays registered.
13
17
  return code.replace(
14
- "class ErrorOverlay",
15
- errorOverlayCode + "\nclass OldErrorOverlay"
18
+ /class ErrorOverlay(?= extends)|\b(var |let |const )ErrorOverlay(?= = class)/,
19
+ (_match, declaration) =>
20
+ errorOverlayCode +
21
+ "\n" +
22
+ (declaration ? `${declaration}OldErrorOverlay` : "class OldErrorOverlay")
16
23
  );
17
24
  },
18
25
  } as Plugin;