-
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
Client bundles contain non es5 code #33314
Comments
Hi, I just double-checked and You can verify this by visiting https://33314.vercel.app in IE11 and it will work fine. That's the lowest possible browser we intend to support, I could actually not find a claim of direct ES5 compatibility in our docs: https://nextjs.org/docs/basic-features/supported-browsers-features |
@balazsorban44 we're facing the same issue. Everything is compiled to ES5 but |
Please open a separate bug report with a reproduction. In this case, I would appreciate a minimal one with the source code, that is also deployed somewhere, so I can verify from an IE11 browser that it is actually happening. |
…cel#33690) ## Bug - [ ] Related issues linked using `fixes vercel#33314` vercel#33314 - [ ] Moved the `is-plain-object` file to the shared directory since it's emitted to the client and thus needs to be transpiled. This is just my 2nd PR so if I'm missing something please let me know.
Run
next info
(available from version 12.0.8 and up)What version of Next.js are you using?
12.0.8
What version of Node.js are you using?
16.7.0
What browser are you using?
Chromium, Firefox
What operating system are you using?
Linux
How are you deploying your application?
next start
Describe the Bug
The update to 12.0.8 introduced a regression w.r.t. es5 compatibility. If running the command series given below the following error occurs:
I think this is related to the changes in #33159 which added a new method
getProperError
to theìs-error.js
file. This method is used on the client side innext/client/index.tsx
. The previously usedisError
function was very simple and es5 compatible. The new method uses theisPlainObject
method which contains aconst
declaration.I think the root cause is that
dist/lib
isn't transpiled during building. Looking at the Babel loader regex onlydist/shared/lib
seems to be transpiled. So moving those files there might be a solution for this problem.Expected Behavior
The Webpack bundle files contain only es5 compatible JavaScript code.
To Reproduce
The text was updated successfully, but these errors were encountered: