@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/build.js
CHANGED
|
@@ -171624,6 +171624,21 @@ var isDev, extractBuildError = (logs, pass, label, frameworkNames, isIncremental
|
|
|
171624
171624
|
if (hmr && reactClientOutputPaths.length > 0) {
|
|
171625
171625
|
await patchRefreshGlobals(reactClientOutputPaths);
|
|
171626
171626
|
}
|
|
171627
|
+
if (hmr) {
|
|
171628
|
+
const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
|
|
171629
|
+
for (const outputPath of reactClientOutputPaths) {
|
|
171630
|
+
let content = readFileSync5(outputPath, "utf-8");
|
|
171631
|
+
let changed = false;
|
|
171632
|
+
content = content.replace(urlPattern, (_match, relPath) => {
|
|
171633
|
+
const absPath = resolve10(dirname6(outputPath), relPath);
|
|
171634
|
+
const rel = relative7(projectRoot, absPath);
|
|
171635
|
+
changed = true;
|
|
171636
|
+
return `new URL('/@src/${rel.replace(/\\/g, "/")}', import.meta.url)`;
|
|
171637
|
+
});
|
|
171638
|
+
if (changed)
|
|
171639
|
+
writeFileSync3(outputPath, content);
|
|
171640
|
+
}
|
|
171641
|
+
}
|
|
171627
171642
|
const nonReactClientLogs = nonReactClientResult?.logs ?? [];
|
|
171628
171643
|
const nonReactClientOutputs = nonReactClientResult?.outputs ?? [];
|
|
171629
171644
|
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 = resolve17(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 = resolve17(fileDir, relPath);
|
|
@@ -205033,5 +205048,5 @@ export {
|
|
|
205033
205048
|
build
|
|
205034
205049
|
};
|
|
205035
205050
|
|
|
205036
|
-
//# debugId=
|
|
205051
|
+
//# debugId=CC21D3972768AF1864756E2164756E21
|
|
205037
205052
|
//# sourceMappingURL=build.js.map
|