fix: remove decodeURI

This commit is contained in:
Nate Moore 2022-08-12 14:42:29 -05:00
parent 3f352ac350
commit e333cc7ce3
2 changed files with 2 additions and 2 deletions

View file

@ -311,7 +311,7 @@ async function generatePath(
scripts,
renderers,
async resolve(specifier: string) {
const hashedFilePath = internals.entrySpecifierToBundleMap.get(decodeURI(specifier));
const hashedFilePath = internals.entrySpecifierToBundleMap.get(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(decodeURI(rid));
internals.discoveredHydratedComponents.add(rid);
}
// Scan hoisted scripts