@absolutejs/absolute 0.19.0-beta.127 → 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 +16 -1
- package/dist/build.js.map +3 -3
- package/dist/index.js +16 -1
- package/dist/index.js.map +3 -3
- 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) {
|
|
@@ -205033,5 +205048,5 @@ export {
|
|
|
205033
205048
|
build
|
|
205034
205049
|
};
|
|
205035
205050
|
|
|
205036
|
-
//# debugId=
|
|
205051
|
+
//# debugId=CC21D3972768AF1864756E2164756E21
|
|
205037
205052
|
//# sourceMappingURL=build.js.map
|