-
Notifications
You must be signed in to change notification settings - Fork 27k
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
[turbopack] dynamic import with path alias not working #63372
Comments
I am having the same issue, it seems to have been fixed sometime during the 14.2.0 canary, but Turbopack for windows on the canary is borked for now. |
@anaedwards73 Hello! I didn't mean that the package is not available now, it's just that Turbopack is currently still in preview and instability & incompatibility are expected for now. If you must use the path alias, you should probably stick to Webpack until this issue is fixed. |
As far as I'm aware, you can't use I'm using turbo for development at work, and it works just fine :) |
This is still an issue as of 14.3.0-canary.29 I have a repo that replicates the problem here: https://github.com/alexanderbnelson/dynamic-import-turbo |
@sokra, it looks like you previously resolved #56531 back in February with vercel/turborepo#7153, but the issue has resurfaced. Can you offer any insight into the problem? |
Thank you for filing this issue. Currently looking to enable @waltershewmake Regarding #56531, it appears it was reverted as part of: vercel/turborepo#7153 @ForsakenHarmony @sokra Perhaps one of you can confirm if this is the case? I double checked https://areweturboyet.com but didn't notice anything specifically failing around this issue. |
I'm using turbopack with @blueprintjs/datetime2 which uses dynamic imports for datefns
The error message
The file in question from Blueprint
|
This comment was marked as spam.
This comment was marked as spam.
Why some one marked my comment as spam, it is not spam at all. |
Experience the same issue. It would be really helpful if someone of the developer team can confirm that dynamic imports are currently not supported with in dev mode with turbopack enabled. Thx! |
@RexGalicie the comment you posted is to the extent of "same issue". These are automatically hidden by GitHub because they're not useful, if you want to raise that you're also running into the issue but you don't have any new context you can add a thumbs up (👍) at the top -- providing that it still happens is not new context as the issue is still open -- So to be clear we did not mark it, this happened automatically. @gurkerl83 the issue is synced into our tracker, which means you can assume that it's an issue. Dynamic imports are supported, the thing that is not supported yet is adding path aliases and then those path aliases applying for dynamically generated paths. If you take the example application and change TLDR: The alias case is something that still has to be implemented. @derek-rein your case would be useful to have as a separate issue as it's unrelated to the reported issue of having path aliases, instead that library has some quite strange output code that we'll have to add special handling for in Turbopack in order to collect the |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/stefanprobst/issue-turbopack-imports
To Reproduce
npm run dev
Current vs. Expected behavior
i have the following dynamic imports, which work with
webpack
, but not withturbopack
:Provide environment information
Operating System: Platform: linux Arch: x64 Version: #202401311935 SMP PREEMPT_DYNAMIC Thu Feb 1 00:46:47 UTC 2024 Available memory (MB): 31403 Available CPU cores: 16 Binaries: Node: 20.11.1 npm: 10.2.4 Yarn: 1.22.19 pnpm: 8.15.4 Relevant Packages: next: 14.2.0-canary.26 // Latest available version is detected (14.2.0-canary.26). eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.4.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Turbopack (--turbo)
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
reopening #61279 which was closed as a duplicate of #56531, which is marked as fixed - however the problem in this issue is not yet fixed.
PACK-2801
The text was updated successfully, but these errors were encountered: