Skip to content

Commit

Permalink
fix: remove .jsx before resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Aug 12, 2022
1 parent f4962c4 commit ae17481
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/astro/src/core/build/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ async function generatePath(
scripts,
renderers,
async resolve(specifier: string) {
if (specifier.endsWith('.jsx')) {
specifier = specifier.slice(0, -4);
}
const hashedFilePath = internals.entrySpecifierToBundleMap.get(specifier);
if (typeof hashedFilePath !== 'string') {
// If no "astro:scripts/before-hydration.js" script exists in the build,
Expand Down

0 comments on commit ae17481

Please sign in to comment.