@base44-preview/vite-plugin 1.0.44-pr.131.04821df → 1.0.44-pr.132.49617f5
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/base44-runtime-plugin.d.ts.map +1 -1
- package/dist/base44-runtime-plugin.js +6 -1
- package/dist/base44-runtime-plugin.js.map +1 -1
- package/dist/visual-edit-plugin.d.ts.map +1 -1
- package/dist/visual-edit-plugin.js +1 -4
- package/dist/visual-edit-plugin.js.map +1 -1
- package/package.json +1 -1
- package/src/base44-runtime-plugin.ts +6 -1
- package/src/visual-edit-plugin.ts +1 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base44-runtime-plugin.d.ts","sourceRoot":"","sources":["../src/base44-runtime-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAsFnC,wBAAgB,mBAAmB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"base44-runtime-plugin.d.ts","sourceRoot":"","sources":["../src/base44-runtime-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAsFnC,wBAAgB,mBAAmB,IAAI,MAAM,CA+B5C"}
|
|
@@ -83,13 +83,18 @@ export function base44RuntimePlugin() {
|
|
|
83
83
|
// Ahead of Vite's own resolution so the bare `base44:` specifier is never
|
|
84
84
|
// mistaken for a URL protocol.
|
|
85
85
|
enforce: "pre",
|
|
86
|
-
resolveId(id) {
|
|
86
|
+
resolveId(id, _importer, options) {
|
|
87
87
|
const reason = unsupportedReason(id);
|
|
88
88
|
if (reason) {
|
|
89
89
|
this.error(`"${id}" is not available in server routes. ${reason}`);
|
|
90
90
|
}
|
|
91
91
|
if (id !== SPECIFIER)
|
|
92
92
|
return null;
|
|
93
|
+
// The dep scanner crawls raw source in the client environment, before
|
|
94
|
+
// TanStack strips server routes and server-fn handlers out of the client
|
|
95
|
+
// graph. Throwing here fails the scan and Vite skips pre-bundling.
|
|
96
|
+
if (options?.scan)
|
|
97
|
+
return { id, external: true };
|
|
93
98
|
// `cloudflare:workers` has no browser equivalent, so a client-side import
|
|
94
99
|
// would bundle a module that cannot run. Fail with the reason instead.
|
|
95
100
|
if (this.environment?.name === "client") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base44-runtime-plugin.js","sourceRoot":"","sources":["../src/base44-runtime-plugin.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,SAAS,GAAG,gBAAgB,CAAC;AACnC,8EAA8E;AAC9E,gDAAgD;AAChD,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAEpC,+EAA+E;AAC/E,iFAAiF;AACjF,sEAAsE;AACtE,MAAM,aAAa,GACjB,8EAA8E,CAAC;AAEjF,SAAS,iBAAiB,CAAC,EAAU;IACnC,IAAI,EAAE,KAAK,uBAAuB;QAAE,OAAO,aAAa,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBtB,CAAC;AAEF,MAAM,UAAU,mBAAmB;IACjC,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,0EAA0E;QAC1E,+BAA+B;QAC/B,OAAO,EAAE,KAAK;QAEd,SAAS,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"base44-runtime-plugin.js","sourceRoot":"","sources":["../src/base44-runtime-plugin.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,SAAS,GAAG,gBAAgB,CAAC;AACnC,8EAA8E;AAC9E,gDAAgD;AAChD,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAEpC,+EAA+E;AAC/E,iFAAiF;AACjF,sEAAsE;AACtE,MAAM,aAAa,GACjB,8EAA8E,CAAC;A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AAK,EAAa,MAAM,EAAc,MAAM,MAAM,CAAC;AAK1D,wBAAgB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"visual-edit-plugin.d.ts","sourceRoot":"","sources":["../src/visual-edit-plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAa,MAAM,EAAc,MAAM,MAAM,CAAC;AAK1D,wBAAgB,gBAAgB,IA+EzB,MAAM,CACZ"}
|
|
@@ -25,10 +25,7 @@ export function visualEditPlugin() {
|
|
|
25
25
|
if (id.includes("node_modules") || id.includes("visual-edit-agent")) {
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
// other queries (?raw, ?url, ?worker) aren't JSX source.
|
|
30
|
-
const [idPath, idQuery] = id.split("?");
|
|
31
|
-
if (!/\.(jsx?|tsx?)$/.test(idPath) || (idQuery && !/tsr-(split|shared)/.test(idQuery))) {
|
|
28
|
+
if (!id.match(/\.(jsx?|tsx?)$/)) {
|
|
32
29
|
return null;
|
|
33
30
|
}
|
|
34
31
|
const filename = extractFilename(id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visual-edit-plugin.js","sourceRoot":"","sources":["../src/visual-edit-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,UAAU,gBAAgB;IAC9B,OAAO;QACL,IAAI,EAAE,uBAAuB;QAC7B,mEAAmE;QACnE,sEAAsE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IAC1E,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -91,13 +91,18 @@ export function base44RuntimePlugin(): Plugin {
|
|
|
91
91
|
// mistaken for a URL protocol.
|
|
92
92
|
enforce: "pre",
|
|
93
93
|
|
|
94
|
-
resolveId(id) {
|
|
94
|
+
resolveId(id, _importer, options) {
|
|
95
95
|
const reason = unsupportedReason(id);
|
|
96
96
|
if (reason) {
|
|
97
97
|
this.error(`"${id}" is not available in server routes. ${reason}`);
|
|
98
98
|
}
|
|
99
99
|
if (id !== SPECIFIER) return null;
|
|
100
100
|
|
|
101
|
+
// The dep scanner crawls raw source in the client environment, before
|
|
102
|
+
// TanStack strips server routes and server-fn handlers out of the client
|
|
103
|
+
// graph. Throwing here fails the scan and Vite skips pre-bundling.
|
|
104
|
+
if ((options as { scan?: boolean } | undefined)?.scan) return { id, external: true };
|
|
105
|
+
|
|
101
106
|
// `cloudflare:workers` has no browser equivalent, so a client-side import
|
|
102
107
|
// would bundle a module that cannot run. Fail with the reason instead.
|
|
103
108
|
if (this.environment?.name === "client") {
|
|
@@ -29,10 +29,7 @@ export function visualEditPlugin() {
|
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
// other queries (?raw, ?url, ?worker) aren't JSX source.
|
|
34
|
-
const [idPath, idQuery] = id.split("?");
|
|
35
|
-
if (!/\.(jsx?|tsx?)$/.test(idPath!) || (idQuery && !/tsr-(split|shared)/.test(idQuery))) {
|
|
32
|
+
if (!id.match(/\.(jsx?|tsx?)$/)) {
|
|
36
33
|
return null;
|
|
37
34
|
}
|
|
38
35
|
|