0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

Remove unused rendering code (#7497)

This commit is contained in:
Bjorn Lu 2023-06-27 22:16:22 +08:00 committed by GitHub
parent a3928016cc
commit a82c6df25b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 17 deletions

View file

@ -23,15 +23,6 @@ import { warn, type LogOptions } from '../logger/core.js';
const clientAddressSymbol = Symbol.for('astro.clientAddress');
const responseSentSymbol = Symbol.for('astro.responseSent');
function onlyAvailableInSSR(name: 'Astro.redirect') {
return function _onlyAvailableInSSR() {
switch (name) {
case 'Astro.redirect':
throw new AstroError(AstroErrorData.StaticRedirectNotAvailable);
}
};
}
export interface CreateResultArgs {
adapterName: string | undefined;
ssr: boolean;

View file

@ -1,8 +0,0 @@
export const SCRIPT_EXTENSIONS = new Set(['.js', '.ts']);
const scriptRe = new RegExp(
`\\.(${Array.from(SCRIPT_EXTENSIONS)
.map((s) => s.slice(1))
.join('|')})($|\\?)`
);
export const isScriptRequest = (request: string): boolean => scriptRe.test(request);