build code transform error using react router createBrowserRouter syntax with lazy import #17655
Closed
7 tasks done
Labels
p4-important
Violate documented behavior or significantly improves performance (priority)
regression
The issue only appears after a new release
Describe the bug
the code
in vite >= 5.3.1 is transformed by
build-import-analysis
plugin into:instead of:
in vite <= 5.3.0.
The bug has been introduced in version 5.3.1 and it's likely caused by this commit
(inspected with vite-plugin-inspect)
Reproduction
https://codesandbox.io/p/devbox/async-import-issue-2yyznw?file=%2Fpackage.json%3A15%2C34
Steps to reproduce
pnpm build
you will get the error
if you run
pnpm dev
everything is ok.System Info
Used Package Manager
pnpm
Logs
Validations
The text was updated successfully, but these errors were encountered: