From 896caf9e6ce1638181ca47a3db9e42127ce1f0c8 Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Mon, 29 Apr 2024 14:22:04 +0200 Subject: [PATCH] Revert "fix: sanitize slashes in filepaths" This reverts commit 5c3a75fac8ab9a3be8e4560f0aeb7e4c3a114d7f. --- packages/astro/src/core/build/static-build.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index ea3b7a7584..a60f7e5a2e 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -9,11 +9,7 @@ import * as vite from 'vite'; import type { RouteData } from '../../@types/astro.js'; import { PROPAGATED_ASSET_FLAG } from '../../content/consts.js'; import { hasAnyContentFlag } from '../../content/utils.js'; -import { - type BuildInternals, - createBuildInternals, - getPageDatasWithPublicKey, -} from '../../core/build/internal.js'; +import { type BuildInternals, createBuildInternals, getPageDatasWithPublicKey } from '../../core/build/internal.js'; import { emptyDir, removeEmptyDirs } from '../../core/fs/index.js'; import { appendForwardSlash, prependForwardSlash, removeFileExtension } from '../../core/path.js'; import { isModeServerWithNoAdapter } from '../../core/util.js'; @@ -377,11 +373,7 @@ async function cleanStaticOutput( const { moduleSpecifier } = pageData; const pageBundleId = internals.pageToBundleMap.get(moduleSpecifier); const entryBundleId = internals.entrySpecifierToBundleMap.get(moduleSpecifier); - if ( - pageData.route.prerender && - !pageData.hasSharedModules && - allStaticFiles.has(pageBundleId ?? entryBundleId) - ) { + if (pageData.route.prerender && !pageData.hasSharedModules && allStaticFiles.has(pageBundleId ?? entryBundleId)) { allStaticFiles.add(pageBundleId ?? entryBundleId); } else { // Check if the page pageBundleId or entryBundleId is already in the set, if so, remove it @@ -544,7 +536,6 @@ export function makeAstroPageEntryPointFileName( return `pages${name .replace(/\/$/, '/index') .replaceAll(/[[\]]/g, '_') - .replaceAll('/', '-') .replaceAll('...', '---')}.astro.mjs`; }