-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
feat: view transitionsRelated to the View Transitions feature (scope)Related to the View Transitions feature (scope)in reviewHas been triaged but not yet decided if it is a bug or not.Has been triaged but not yet decided if it is a bug or not.needs reproIssue needs a reproductionIssue needs a reproduction
Description
Astro Info
Astro v5.14.1
Node v20.12.1
Package Manager yarn
Output server
Adapter @astrojs/node
Integrations @astrojs/react
Describe the Bug
When using View Transitions(importing ClientRouter and ViewTransitions), the browser console shows an error:
Failed to resolve module specifier "astro:transitions/client"
This is caused by a type-only import on line 7 of the internal clientRouter.astro component:
import type { Options } from 'astro:transitions/client';This type import is not being stripped during build and reaches the browser, causing a runtime error.
Reproduction
- Create an Astro project with View Transitions enabled while using ClientRouter and ViewTransitions
- Add View Transitions to a page
- Check browser console - error appears
Additional Context
tsconfig.json:
{
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"allowJs": true,
"jsx": "react-jsx",
"jsxImportSource": "react",
"strict": true
}
}What's the expected result?
Type imports should be stripped during compilation and not reach the browser.
Metadata
Metadata
Assignees
Labels
feat: view transitionsRelated to the View Transitions feature (scope)Related to the View Transitions feature (scope)in reviewHas been triaged but not yet decided if it is a bug or not.Has been triaged but not yet decided if it is a bug or not.needs reproIssue needs a reproductionIssue needs a reproduction