securityos/node_modules/next/dist/server/app-render/get-asset-query-string.js

23 lines
620 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getAssetQueryString", {
enumerable: true,
get: function() {
return getAssetQueryString;
}
});
function getAssetQueryString(ctx, addTimestamp) {
const isDev = process.env.NODE_ENV === "development";
let qs = "";
if (isDev && addTimestamp) {
qs += `?v=${ctx.requestTimestamp}`;
}
if (ctx.renderOpts.deploymentId) {
qs += `${isDev ? "&" : "?"}dpl=${ctx.renderOpts.deploymentId}`;
}
return qs;
}
//# sourceMappingURL=get-asset-query-string.js.map