Declare illegal variable names in minify/build? #12355
Unanswered
CodyCodes95
asked this question in
Q&A
Replies: 2 comments
-
Bump, any help would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Experiencing the same currently, we have a site using knockout js, which defines the global variable The minified script now declares a vue component with this name and therefore breaking all user code on the site. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys, got a quite niche one, wondering if anyone can help me out in solving it.
I develop React apps that are embedded into proprietary CMS websites. A bit unconventional, but yeah. These websites often have a lot of custom js on the page, and the global variables on the page conflict with variables that my Vite app builds into, causing errors. The only way around this is to disable minifying so I have control over the variable names, or modify each conflicting var after build.
What I would like to do is config my minify to NOT use certain variable names, is this at all possible?
Cheers,
Beta Was this translation helpful? Give feedback.
All reactions