Skip to content

Commit

Permalink
Crude fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Aug 11, 2022
1 parent fef9978 commit 027e222
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/astro/src/core/build/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/build/vite-plugin-analyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 027e222

Please sign in to comment.