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

Need an update of @babel/core to fix Type-only import specifiers issue #37016

Closed
1 task done
7iomka opened this issue May 18, 2022 · 3 comments · Fixed by #37145
Closed
1 task done

Need an update of @babel/core to fix Type-only import specifiers issue #37016

7iomka opened this issue May 18, 2022 · 3 comments · Fixed by #37145
Labels
good first issue Easy to fix issues, good for newcomers

Comments

@7iomka
Copy link
Contributor

7iomka commented May 18, 2022

Verify canary release

  • I verified that the issue exists in Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 19.6.0: Sun Nov 14 19:58:51 PST 2021; root:xnu-6153.141.50~1/RELEASE_X86_64
Binaries:
  Node: 16.5.0
  npm: 8.3.0
  Yarn: 1.17.3
  pnpm: N/A
Relevant packages:
  next: 12.1.7-canary.6
  react: 17.0.2
  react-dom: 17.0.2

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

Latest next.js + babel not supported Type-only import specifiers because version of @babel/core for now is 7.15.0

"@babel/core": "7.15.0",

For my case I can't drop babel, but I need this feature, because it works without babel with typescript 4.5+.

Expected Behavior

Type-only import specifiers are supported

To Reproduce

Just run any project with next.js and babel and try

// TypeScript 4.5
import { type Foo, fooInstance } from "my-module";

This code will give you an error
Unexpected token, expected ","

Without babel, all works fine.

@7iomka 7iomka added the bug Issue was opened via the bug report template. label May 18, 2022
@timneutkens
Copy link
Member

Feel free to open a PR!

@timneutkens timneutkens added kind: story good first issue Easy to fix issues, good for newcomers and removed bug Issue was opened via the bug report template. labels May 23, 2022
@7iomka
Copy link
Contributor Author

7iomka commented May 23, 2022

Feel free to open a PR!

Done. I don't know if that small change is enough :)

@kodiakhq kodiakhq bot closed this as completed in #37145 May 31, 2022
kodiakhq bot pushed a commit that referenced this issue May 31, 2022
Update of @babel/core to fix Type-only import specifiers issue


Fixes [#37016](#37016)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Easy to fix issues, good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants