Error: "this is undefined" & html-minifier-terser deleted something major, cannot proceed. #2202
Unanswered
FranGomezVenegas
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I migrated one existing project to use open-wc recently and then I'm in the way to generate my first build/dist.
When I run the project by npm start from the code then everything works fine but when I try to create my first build then I have 6 lines with the message "html-minifier-terser deleted something major, cannot proceed." and two other issues about "error: this is undefined".
This is happening in two components that are not part of my development but imported, google-chart and ua-parser
As example, in ua-parser it indicates that the problem is caused by the "this" on this line: )(typeof window === 'object' ? window : this);
I tried to deploy it in my webserver and then it has 3 errors when trying to load the same js file, and this js file starts by this: "const e="undefined"!=typeof window&&null!=window. ...."
I read https://rollupjs.org/guide/en/#error-this-is-undefined but found no way to fix the problem for this this is undefined issues.
For html-minifier-terser deleted something major, cannot proceed. I found no reference anywhere and even I don't know which is the object that causes this error.
Please, any useful info on how to handle those stoppers would be really appreciate and welcome.
Thanks in advance
Regards,
Beta Was this translation helpful? Give feedback.
All reactions