nitro-nightly 3.0.1-20251104-223815-3402cc78 → 3.0.1-20251105-084427-e1d71095
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/dist/_build/common.mjs +3 -3
- package/dist/_presets.mjs +1 -0
- package/package.json +1 -1
package/dist/_build/common.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { t as require_etag } from "../_libs/etag.mjs";
|
|
|
11
11
|
import { dirname } from "node:path";
|
|
12
12
|
import { camelCase } from "scule";
|
|
13
13
|
import { promises } from "node:fs";
|
|
14
|
-
import { withTrailingSlash } from "ufo";
|
|
14
|
+
import { joinURL, withTrailingSlash } from "ufo";
|
|
15
15
|
import { mkdir, readFile, symlink, unlink } from "node:fs/promises";
|
|
16
16
|
import { defu } from "defu";
|
|
17
17
|
import { runtimeDependencies, runtimeDir } from "nitro/runtime/meta";
|
|
@@ -375,7 +375,7 @@ function publicAssets(nitro) {
|
|
|
375
375
|
const assetData = await promises.readFile(fullPath);
|
|
376
376
|
const etag = (0, import_etag$1.default)(assetData);
|
|
377
377
|
const stat$1 = await promises.stat(fullPath);
|
|
378
|
-
const assetId =
|
|
378
|
+
const assetId = joinURL(nitro.options.baseURL, decodeURIComponent(id));
|
|
379
379
|
let encoding;
|
|
380
380
|
if (id.endsWith(".gz")) encoding = "gzip";
|
|
381
381
|
else if (id.endsWith(".br")) encoding = "br";
|
|
@@ -429,7 +429,7 @@ export function readAsset (id) {
|
|
|
429
429
|
}`;
|
|
430
430
|
},
|
|
431
431
|
"#nitro-internal-virtual/public-assets": () => {
|
|
432
|
-
const publicAssetBases = Object.fromEntries(nitro.options.publicAssets.filter((dir) => !dir.fallthrough && dir.baseURL !== "/").map((dir) => [withTrailingSlash(dir.baseURL), { maxAge: dir.maxAge }]));
|
|
432
|
+
const publicAssetBases = Object.fromEntries(nitro.options.publicAssets.filter((dir) => !dir.fallthrough && dir.baseURL !== "/").map((dir) => [withTrailingSlash(joinURL(nitro.options.baseURL, dir.baseURL || "/")), { maxAge: dir.maxAge }]));
|
|
433
433
|
return `
|
|
434
434
|
import assets from '#nitro-internal-virtual/public-assets-data'
|
|
435
435
|
export { readAsset } from "${`#nitro-internal-virtual/public-assets-${readAssetHandler[nitro.options.serveStatic] || "null"}`}"
|
package/dist/_presets.mjs
CHANGED
|
@@ -1321,6 +1321,7 @@ const standard = defineNitroPreset({
|
|
|
1321
1321
|
entry: "./standard/runtime/server",
|
|
1322
1322
|
serveStatic: false,
|
|
1323
1323
|
exportConditions: ["import", "default"],
|
|
1324
|
+
output: { publicDir: "{{ output.dir }}/public/{{ baseURL }}" },
|
|
1324
1325
|
commands: { preview: "npx srvx --prod ./" },
|
|
1325
1326
|
alias: {
|
|
1326
1327
|
srvx: "srvx/generic",
|
package/package.json
CHANGED