Crude fix

This commit is contained in:
Princesseuh 2022-08-11 14:05:49 -04:00
parent fef99782d0
commit 027e22240f
No known key found for this signature in database
GPG key ID: 105BBD6D57F2B0C0
2 changed files with 2 additions and 2 deletions
packages/astro/src/core/build

View file

@ -311,7 +311,7 @@ async function generatePath(
scripts,
renderers,
async resolve(specifier: string) {
const hashedFilePath = internals.entrySpecifierToBundleMap.get(specifier);
const hashedFilePath = internals.entrySpecifierToBundleMap.get(decodeURI(specifier));
if (typeof hashedFilePath !== 'string') {
// If no "astro:scripts/before-hydration.js" script exists in the build,
// then we can assume that no before-hydration scripts are needed.

View file

@ -83,7 +83,7 @@ export function vitePluginAnalyzer(internals: BuildInternals): VitePlugin {
for (const c of astro.hydratedComponents) {
const rid = c.resolvedPath ? resolveClientDevPath(c.resolvedPath) : c.specifier;
internals.discoveredHydratedComponents.add(rid);
internals.discoveredHydratedComponents.add(decodeURI(rid));
}
// Scan hoisted scripts