Hi,
I'm using Laravel 10 framework.
after I run 'npm run build' command, all file compiled and minified but the problem is some my function or variable is deleted in compiled file so in console of browser i'will got 'Uncaught ReferenceError' think because of tree-shaking.
also my name of functions will be changed. but in html document I've use the function name for example onchange="change data()" in select box. but the compiled file change the function to 'd' or something else;
how can i prevent vite from remove my js function and changing name.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
Hi, I'm using Laravel 10 framework. after I run 'npm run build' command, all file compiled and minified but the problem is some my function or variable is deleted in compiled file so in console of browser i'will got 'Uncaught ReferenceError' think because of tree-shaking. also my name of functions will be changed. but in html document I've use the function name for example onchange="change data()" in select box. but the compiled file change the function to 'd' or something else; how can i prevent vite from remove my js function and changing name.
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations