How to make next.js build compatible with ES5 (chrome 44)? #70598
Unanswered
MartinPavlik
asked this question in
Help
Replies: 2 comments 1 reply
-
Have you looked into this thread? #10440 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I just read and it did not help much. It seems like the thread is about next 9 and chrome 58, I'm trying to get support for much older version of chrome with which nextjs is not compatible. I have tried to include all the packages in the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Hello,
is there some way how to make output JS files that are built by Next.js 13.5.0 using SWC compatible with Chrome 44? I would need to replace spread operator with object.assign, replace arrow functions with standard function definitions etc.
Is there some way how to do this using swc? For example running another step after Next.js build and transpile the files again using SWC with .swrc file?
Additional information
I also tried to use babel for this, but I get this error on build while using babelrc file:
the
.babelrc
file looks like this:Another thing I've tried is setting the
package.json
propertybrowserlist
while using SWC:And I put into the
next.config.js
:But it looks like it had no effect / or it ignored the browserlist, since the it left arrow functions in the output, for example:
whenEntrypoint: r => withFuture(r, n),
.Example
No response
Thank you for any help!
Beta Was this translation helpful? Give feedback.
All reactions