@absolutejs/absolute 0.19.0-beta.43 → 0.19.0-beta.45
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/.absolutejs/tsconfig.tsbuildinfo +1 -1
- package/dist/build.js +21 -8
- package/dist/build.js.map +3 -3
- package/dist/dev/client/handlers/react.ts +0 -8
- package/dist/index.js +21 -8
- package/dist/index.js.map +3 -3
- package/native/packages/darwin-arm64/package.json +1 -1
- package/native/packages/darwin-x64/package.json +1 -1
- package/native/packages/linux-arm64/package.json +1 -1
- package/native/packages/linux-x64/package.json +1 -1
- package/package.json +5 -5
|
@@ -35,14 +35,6 @@ export const handleReactUpdate = (message: {
|
|
|
35
35
|
const refreshRuntime = window.$RefreshRuntime$;
|
|
36
36
|
const serverDuration = message.data.serverDuration;
|
|
37
37
|
|
|
38
|
-
// Inline code path: transpiled code sent via WebSocket.
|
|
39
|
-
// Import from blob URL — no HTTP fetch, immune to bun --hot restarts.
|
|
40
|
-
if (message.data.code && refreshRuntime) {
|
|
41
|
-
applyInlineCode(message.data.code, refreshRuntime, serverDuration);
|
|
42
|
-
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
38
|
// ESM fast path: import the page module directly
|
|
47
39
|
const pageModuleUrl = message.data.pageModuleUrl;
|
|
48
40
|
|
package/dist/index.js
CHANGED
|
@@ -202253,16 +202253,29 @@ ${stubs}
|
|
|
202253
202253
|
return { dynamicRegex, fromRegex, lookup, sideEffectRegex };
|
|
202254
202254
|
}, rewriteImports2 = (code, filePath, projectRoot, rewriter) => {
|
|
202255
202255
|
let result = code;
|
|
202256
|
-
|
|
202257
|
-
const
|
|
202258
|
-
|
|
202256
|
+
if (rewriter) {
|
|
202257
|
+
const replacer = (_match, prefix, specifier, suffix) => {
|
|
202258
|
+
const webPath = rewriter.lookup.get(specifier);
|
|
202259
|
+
if (!webPath)
|
|
202260
|
+
return _match;
|
|
202259
202261
|
return `${prefix}${webPath}${suffix}`;
|
|
202262
|
+
};
|
|
202263
|
+
rewriter.fromRegex.lastIndex = 0;
|
|
202264
|
+
rewriter.sideEffectRegex.lastIndex = 0;
|
|
202265
|
+
rewriter.dynamicRegex.lastIndex = 0;
|
|
202266
|
+
result = result.replace(rewriter.fromRegex, replacer);
|
|
202267
|
+
result = result.replace(rewriter.sideEffectRegex, replacer);
|
|
202268
|
+
result = result.replace(rewriter.dynamicRegex, replacer);
|
|
202269
|
+
}
|
|
202270
|
+
const stubReplace = (_match, prefix, specifier, suffix) => {
|
|
202271
|
+
if (specifier.startsWith("/") || specifier.startsWith("."))
|
|
202272
|
+
return _match;
|
|
202260
202273
|
return `${prefix}/@stub/${encodeURIComponent(specifier)}${suffix}`;
|
|
202261
202274
|
};
|
|
202262
|
-
result = result.replace(/^(import\s+.+?\s+from\s*["'])([^"'./][^"']*)(["'])/gm,
|
|
202263
|
-
result = result.replace(/^(import\s*["'])([^"'./][^"']*)(["'])/gm,
|
|
202264
|
-
result = result.replace(/^(export\s+.+?\s+from\s*["'])([^"'./][^"']*)(["'])/gm,
|
|
202265
|
-
result = result.replace(/(import\s*\(\s*["'])([^"'./][^"']*)(["']\s*\))/g,
|
|
202275
|
+
result = result.replace(/^(import\s+.+?\s+from\s*["'])([^"'./][^"']*)(["'])/gm, stubReplace);
|
|
202276
|
+
result = result.replace(/^(import\s*["'])([^"'./][^"']*)(["'])/gm, stubReplace);
|
|
202277
|
+
result = result.replace(/^(export\s+.+?\s+from\s*["'])([^"'./][^"']*)(["'])/gm, stubReplace);
|
|
202278
|
+
result = result.replace(/(import\s*\(\s*["'])([^"'./][^"']*)(["']\s*\))/g, stubReplace);
|
|
202266
202279
|
const fileDir = dirname7(filePath);
|
|
202267
202280
|
result = result.replace(/(from\s*["'])(\.\.?\/[^"']+)(["'])/g, (_match, prefix, relPath, suffix) => {
|
|
202268
202281
|
const absPath = resolve18(fileDir, relPath);
|
|
@@ -204667,5 +204680,5 @@ export {
|
|
|
204667
204680
|
ANGULAR_INIT_TIMEOUT_MS
|
|
204668
204681
|
};
|
|
204669
204682
|
|
|
204670
|
-
//# debugId=
|
|
204683
|
+
//# debugId=353A4DB53F40B1B164756E2164756E21
|
|
204671
204684
|
//# sourceMappingURL=index.js.map
|