diff options
author | 2023-06-27 22:16:22 +0800 | |
---|---|---|
committer | 2023-06-27 22:16:22 +0800 | |
commit | a82c6df25b1704670a4c98f05c11422ee878d3d1 (patch) | |
tree | aa0201b2e7140f83f5b8e767b50f9becab90ed74 | |
parent | a3928016cc375842cf47e7a227835cd17e48a409 (diff) | |
download | astro-a82c6df25b1704670a4c98f05c11422ee878d3d1.tar.gz astro-a82c6df25b1704670a4c98f05c11422ee878d3d1.tar.zst astro-a82c6df25b1704670a4c98f05c11422ee878d3d1.zip |
Remove unused rendering code (#7497)
Diffstat (limited to '')
-rw-r--r-- | packages/astro/src/core/render/result.ts | 9 | ||||
-rw-r--r-- | packages/astro/src/core/render/script.ts | 8 |
2 files changed, 0 insertions, 17 deletions
diff --git a/packages/astro/src/core/render/result.ts b/packages/astro/src/core/render/result.ts index 35155306c..27ac2ca1c 100644 --- a/packages/astro/src/core/render/result.ts +++ b/packages/astro/src/core/render/result.ts @@ -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; diff --git a/packages/astro/src/core/render/script.ts b/packages/astro/src/core/render/script.ts deleted file mode 100644 index a91391963..000000000 --- a/packages/astro/src/core/render/script.ts +++ /dev/null @@ -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); |