@absolutejs/absolute 0.19.0-beta.31 → 0.19.0-beta.33
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 -6
- package/dist/build.js.map +4 -4
- package/dist/index.js +31 -6
- package/dist/index.js.map +5 -5
- package/dist/src/dev/moduleServer.d.ts +3 -0
- 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
package/dist/build.js
CHANGED
|
@@ -202157,6 +202157,8 @@ var init_transformCache = __esm(() => {
|
|
|
202157
202157
|
// src/dev/moduleServer.ts
|
|
202158
202158
|
var exports_moduleServer = {};
|
|
202159
202159
|
__export(exports_moduleServer, {
|
|
202160
|
+
warmCache: () => warmCache,
|
|
202161
|
+
setGlobalModuleServer: () => setGlobalModuleServer,
|
|
202160
202162
|
invalidateModule: () => invalidateModule,
|
|
202161
202163
|
createModuleServer: () => createModuleServer,
|
|
202162
202164
|
SRC_URL_PREFIX: () => SRC_URL_PREFIX
|
|
@@ -202339,8 +202341,19 @@ export default {};
|
|
|
202339
202341
|
if (!pathname.startsWith(SRC_PREFIX))
|
|
202340
202342
|
return;
|
|
202341
202343
|
const relPath = pathname.slice(SRC_PREFIX.length);
|
|
202342
|
-
|
|
202343
|
-
|
|
202344
|
+
let filePath = resolve16(projectRoot, relPath);
|
|
202345
|
+
let ext = extname3(filePath);
|
|
202346
|
+
if (!ext) {
|
|
202347
|
+
const tryExts = [".tsx", ".ts", ".jsx", ".js"];
|
|
202348
|
+
for (const tryExt of tryExts) {
|
|
202349
|
+
try {
|
|
202350
|
+
statSync2(filePath + tryExt);
|
|
202351
|
+
filePath += tryExt;
|
|
202352
|
+
ext = tryExt;
|
|
202353
|
+
break;
|
|
202354
|
+
} catch {}
|
|
202355
|
+
}
|
|
202356
|
+
}
|
|
202344
202357
|
try {
|
|
202345
202358
|
if (ext === ".css") {
|
|
202346
202359
|
return new Response(handleCssRequest(filePath), {
|
|
@@ -202383,7 +202396,15 @@ export default {};
|
|
|
202383
202396
|
});
|
|
202384
202397
|
}
|
|
202385
202398
|
};
|
|
202386
|
-
}, invalidateModule,
|
|
202399
|
+
}, invalidateModule, warmCache = (pathname) => {
|
|
202400
|
+
if (!pathname.startsWith(SRC_PREFIX))
|
|
202401
|
+
return;
|
|
202402
|
+
if (!globalModuleServer)
|
|
202403
|
+
return;
|
|
202404
|
+
globalModuleServer(pathname);
|
|
202405
|
+
}, globalModuleServer = null, setGlobalModuleServer = (handler) => {
|
|
202406
|
+
globalModuleServer = handler;
|
|
202407
|
+
}, SRC_URL_PREFIX;
|
|
202387
202408
|
var init_moduleServer = __esm(() => {
|
|
202388
202409
|
init_transformCache();
|
|
202389
202410
|
jsTranspiler2 = new Bun.Transpiler({
|
|
@@ -202912,10 +202933,12 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202912
202933
|
Object.assign(state.manifest, clientManifest);
|
|
202913
202934
|
await populateAssetStore(state.assetStore, clientManifest, buildDir);
|
|
202914
202935
|
}, getReactModuleUrl = async (pageFile) => {
|
|
202915
|
-
const { invalidateModule: invalidateModule2, SRC_URL_PREFIX: SRC_URL_PREFIX2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
|
|
202936
|
+
const { invalidateModule: invalidateModule2, warmCache: warmCache2, SRC_URL_PREFIX: SRC_URL_PREFIX2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
|
|
202916
202937
|
invalidateModule2(pageFile);
|
|
202917
202938
|
const rel = relative8(process.cwd(), pageFile).replace(/\\/g, "/");
|
|
202918
|
-
|
|
202939
|
+
const url = `${SRC_URL_PREFIX2}${rel}`;
|
|
202940
|
+
warmCache2(url);
|
|
202941
|
+
return url;
|
|
202919
202942
|
}, handleReactFastPath = async (state, config, filesToRebuild, startTime, onRebuildComplete) => {
|
|
202920
202943
|
const reactDir = config.reactDirectory ?? "";
|
|
202921
202944
|
const reactPagesPath = resolve19(reactDir, "pages");
|
|
@@ -204181,5 +204204,5 @@ export {
|
|
|
204181
204204
|
build
|
|
204182
204205
|
};
|
|
204183
204206
|
|
|
204184
|
-
//# debugId=
|
|
204207
|
+
//# debugId=910E5CD45BB2C07864756E2164756E21
|
|
204185
204208
|
//# sourceMappingURL=build.js.map
|