diff --git a/.changeset/soft-plants-hope.md b/.changeset/soft-plants-hope.md new file mode 100644 index 000000000..1268215d3 --- /dev/null +++ b/.changeset/soft-plants-hope.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Simplify internal resolver in dev diff --git a/packages/astro/src/core/render/dev/resolve.ts b/packages/astro/src/core/render/dev/resolve.ts index 164333cdc..1c8204591 100644 --- a/packages/astro/src/core/render/dev/resolve.ts +++ b/packages/astro/src/core/render/dev/resolve.ts @@ -8,13 +8,6 @@ export function createResolve(loader: ModuleLoader, root: URL) { // - /Users/macos/project/src/Foo.vue // - C:/Windows/project/src/Foo.vue (normalized slash) return async function (s: string) { - const url = await resolveIdToUrl(loader, s, root); - // Vite does not resolve .jsx -> .tsx when coming from hydration script import, - // clip it so Vite is able to resolve implicitly. - if (url.startsWith('/') && url.endsWith('.jsx')) { - return url.slice(0, -4); - } else { - return url; - } + return await resolveIdToUrl(loader, s, root); }; }