@absolutejs/absolute 0.19.0-beta.126 → 0.19.0-beta.128
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 +17 -2
- package/dist/build.js.map +4 -4
- package/dist/index.js +17 -2
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -171703,6 +171703,21 @@ var isDev, extractBuildError = (logs, pass, label, frameworkNames, isIncremental
|
|
|
171703
171703
|
if (hmr && reactClientOutputPaths.length > 0) {
|
|
171704
171704
|
await patchRefreshGlobals(reactClientOutputPaths);
|
|
171705
171705
|
}
|
|
171706
|
+
if (hmr) {
|
|
171707
|
+
const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
|
|
171708
|
+
for (const outputPath of reactClientOutputPaths) {
|
|
171709
|
+
let content = readFileSync5(outputPath, "utf-8");
|
|
171710
|
+
let changed = false;
|
|
171711
|
+
content = content.replace(urlPattern, (_match, relPath) => {
|
|
171712
|
+
const absPath = resolve11(dirname6(outputPath), relPath);
|
|
171713
|
+
const rel = relative7(projectRoot, absPath);
|
|
171714
|
+
changed = true;
|
|
171715
|
+
return `new URL('/@src/${rel.replace(/\\/g, "/")}', import.meta.url)`;
|
|
171716
|
+
});
|
|
171717
|
+
if (changed)
|
|
171718
|
+
writeFileSync3(outputPath, content);
|
|
171719
|
+
}
|
|
171720
|
+
}
|
|
171706
171721
|
const nonReactClientLogs = nonReactClientResult?.logs ?? [];
|
|
171707
171722
|
const nonReactClientOutputs = nonReactClientResult?.outputs ?? [];
|
|
171708
171723
|
if (nonReactClientResult && !nonReactClientResult.success && nonReactClientLogs.length > 0) {
|
|
@@ -202641,7 +202656,7 @@ ${stubs}
|
|
|
202641
202656
|
result = result.replace(/new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g, (_match, relPath) => {
|
|
202642
202657
|
const absPath = resolve18(fileDir, relPath);
|
|
202643
202658
|
const rel = relative8(projectRoot, absPath);
|
|
202644
|
-
return `new URL('
|
|
202659
|
+
return `new URL('${srcUrl(rel, projectRoot)}', import.meta.url)`;
|
|
202645
202660
|
});
|
|
202646
202661
|
result = result.replace(/import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g, (_match, relPath) => {
|
|
202647
202662
|
const absPath = resolve18(fileDir, relPath);
|
|
@@ -205695,5 +205710,5 @@ export {
|
|
|
205695
205710
|
ANGULAR_INIT_TIMEOUT_MS
|
|
205696
205711
|
};
|
|
205697
205712
|
|
|
205698
|
-
//# debugId=
|
|
205713
|
+
//# debugId=A8CC6D5890C6D9A264756E2164756E21
|
|
205699
205714
|
//# sourceMappingURL=index.js.map
|