Stop Vite/Rollup from using a function name when building #5172
Unanswered
leo-petrucci
asked this question in
Q&A
Replies: 2 comments 5 replies
-
Did you find a way to fix this @creativiii ? |
Beta Was this translation helpful? Give feedback.
5 replies
-
@leo-petrucci Where you able to later find a way? |
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
-
I'm having problems with a script that needs to be compiled on its own and then included in pages for other projects.
Essentially, when building and minifying my script Vite renames one of my functions
ga()
.ga()
unfortunately also seems to be commonly used by Google Analytics, so this causes problems whenever my script is loaded on a page using a package trying to interface with Google Analytics.I'm not 100% of why this is happening behind the scenes, but there's definitely an issue with the name
ga()
.Is there any way to tell Vite/Rollup to not change my function names, or even better, specify I don't want any of my functions/variables called
ga
?Beta Was this translation helpful? Give feedback.
All reactions