-
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
Next.js 11 fails on custom .babelrc with JSON5 syntax #26163
Labels
bug
Issue was opened via the bug report template.
Comments
@timneutkens What's the solution ? |
8 tasks
kodiakhq bot
pushed a commit
that referenced
this issue
Jun 16, 2021
## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. ## Documentation / Examples - [ ] Make sure the linting passes Fixes: #26163
This should be fixed in |
This was referenced Jun 17, 2021
flybayer
pushed a commit
to blitz-js/next.js
that referenced
this issue
Jun 24, 2021
## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. ## Documentation / Examples - [ ] Make sure the linting passes Fixes: vercel#26163
Came here from #25434, but it looks like this bug also exists on 10.2.4.canary3. |
This was referenced Jul 1, 2021
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
11.0.0 (same issue with
11.0.1-canary.0
)What version of Node.js are you using?
16.3.0
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
next dev
Describe the Bug
This is a follow-up to #26131 given that was closed and I've managed to really track it down further. I think #26156 is caused by the same issue as well.
When using a custom
.babelrc
containing a trailing comma (or other JSON5 syntax) the config parsing will fail. Babel's docs mentions they using JSON5 to parse.babelrc
files which isn't the case in the new Next.js 11 babel-loader. I think it would make sense to follow the same behaviour as Babel.Expected Behavior
No errors, Next should be able to use my custom
.babelrc
just fine.To Reproduce
Create a
.babelrc
file in the root of your Next.js project.Enter the following code:
This will also trigger the same issue:
I'd be happy to provide a PR fixing this issue.
The text was updated successfully, but these errors were encountered: