How do I use Terser's "keep_quoted" option in my next.js app without breaking the code? #13660
Unanswered
JayJohn1869
asked this question in
Help
Replies: 2 comments 7 replies
-
Can you please provide a code example that breaks? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Even a starter file, like this one breaks: export default function App() {
return (
<h1>Hello</h1>
)
} My guess is that terser mangles react/next.js internal properties as well, so that code like |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have the following config that sets the
keep_quoted
propery inmangle
to true. (See mangle options)This causes the code to break. Thankfully terser accepts a
reserved
option which is an array of identifiers that will not have their properties mangled.Is there a list of all the properties that need to go into this array so that the code functions?
Note that I'm looking for identifiers used by next.js and react, since my objects are already using the bracket syntax to access property names if needed!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions