Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi line dynamic imports fail #22

Closed
deckchairlabs opened this issue Nov 2, 2021 · 1 comment
Closed

Multi line dynamic imports fail #22

deckchairlabs opened this issue Nov 2, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@deckchairlabs
Copy link
Member

deckchairlabs commented Nov 2, 2021

Looks like the filename replacement in transform.ts isn't handling the below case correctly. The browser will still attempt to fetch http://localhost:3000/about.tsx instead of http://localhost:3000/about.js?ts=1635841084565

const Home = React.lazy(() => import('./home.tsx'))
const About = React.lazy(() => {
  return import('./about.tsx')
})

Screenshot 2021-11-02 185409

@mashaal mashaal added the bug Something isn't working label Feb 9, 2022
@mashaal
Copy link
Member

mashaal commented Feb 19, 2022

Thanks for this report @deckchairlabs -- and apologies for the delay. These multiline dynamic imports needed an update to the SWC transform that we are using.

This fix will go out in v0.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants