@absolutejs/absolute 0.19.0-beta.103 → 0.19.0-beta.104
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 +29 -1
- package/dist/build.js.map +4 -4
- package/dist/index.js +29 -1
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -171640,6 +171640,21 @@ var isDev, extractBuildError = (logs, pass, label, frameworkNames, isIncremental
|
|
|
171640
171640
|
}
|
|
171641
171641
|
const reactClientLogs = reactClientResult?.logs ?? [];
|
|
171642
171642
|
const reactClientOutputs = reactClientResult?.outputs ?? [];
|
|
171643
|
+
if (hmr && reactClientOutputs.length > 0) {
|
|
171644
|
+
const REFRESH_NOOP_RE = /window\.\$RefreshReg\$\|\|\(window\.\$RefreshReg\$=function\(\)\{\}\);window\.\$RefreshSig\$\|\|\(window\.\$RefreshSig\$=function\(\)\{return function\(t\)\{return t\}\}\);?\n?/g;
|
|
171645
|
+
for (const output of reactClientOutputs) {
|
|
171646
|
+
if (output.kind !== "entry-point")
|
|
171647
|
+
continue;
|
|
171648
|
+
try {
|
|
171649
|
+
const content = await Bun.file(output.path).text();
|
|
171650
|
+
if (REFRESH_NOOP_RE.test(content)) {
|
|
171651
|
+
REFRESH_NOOP_RE.lastIndex = 0;
|
|
171652
|
+
const stripped = content.replace(REFRESH_NOOP_RE, "");
|
|
171653
|
+
writeFileSync3(output.path, stripped);
|
|
171654
|
+
}
|
|
171655
|
+
} catch {}
|
|
171656
|
+
}
|
|
171657
|
+
}
|
|
171643
171658
|
if (reactClientResult && !reactClientResult.success && reactClientLogs.length > 0) {
|
|
171644
171659
|
extractBuildError(reactClientLogs, "react-client", "React client", frameworkNames, isIncremental, throwOnError);
|
|
171645
171660
|
}
|
|
@@ -203484,6 +203499,19 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
|
|
|
203484
203499
|
if (vendorPaths) {
|
|
203485
203500
|
await rewriteReactImports2(clientResult.outputs.map((art) => art.path), vendorPaths);
|
|
203486
203501
|
}
|
|
203502
|
+
const { readFileSync: readFs, writeFileSync: writeFs } = await import("fs");
|
|
203503
|
+
const NOOP_RE = /window\.\$RefreshReg\$\|\|\(window\.\$RefreshReg\$=function\(\)\{\}\);window\.\$RefreshSig\$\|\|\(window\.\$RefreshSig\$=function\(\)\{return function\(t\)\{return t\}\}\);?\n?/g;
|
|
203504
|
+
for (const output of clientResult.outputs) {
|
|
203505
|
+
if (output.kind !== "entry-point")
|
|
203506
|
+
continue;
|
|
203507
|
+
try {
|
|
203508
|
+
const content = readFs(output.path, "utf-8");
|
|
203509
|
+
if (NOOP_RE.test(content)) {
|
|
203510
|
+
NOOP_RE.lastIndex = 0;
|
|
203511
|
+
writeFs(output.path, content.replace(NOOP_RE, ""));
|
|
203512
|
+
}
|
|
203513
|
+
} catch {}
|
|
203514
|
+
}
|
|
203487
203515
|
const clientManifest = generateManifest2(clientResult.outputs, buildDir);
|
|
203488
203516
|
Object.assign(state.manifest, clientManifest);
|
|
203489
203517
|
await populateAssetStore(state.assetStore, clientManifest, buildDir);
|
|
@@ -205323,5 +205351,5 @@ export {
|
|
|
205323
205351
|
ANGULAR_INIT_TIMEOUT_MS
|
|
205324
205352
|
};
|
|
205325
205353
|
|
|
205326
|
-
//# debugId=
|
|
205354
|
+
//# debugId=6252097A699EFD8B64756E2164756E21
|
|
205327
205355
|
//# sourceMappingURL=index.js.map
|