# Problem and possible solution to parsing error when uploading pre-compiled JS

**URL:** <https://community.hubspot.com/t/problem-and-possible-solution-to-parsing-error-when-uploading-pre-compiled-js/90530>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [September 26, 2023, 8:57pm UTC](https://community.hubspot.com/t/problem-and-possible-solution-to-parsing-error-when-uploading-pre-compiled-js/90530 "2023-09-26T20:57:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TNorton7](https://avatars.discourse-cdn.com/v4/letter/t/e495f1/32.png) [@TNorton7](https://community.hubspot.com/u/TNorton7)\
**Post date:** [September 26, 2023, 8:57pm UTC](https://community.hubspot.com/t/problem-and-possible-solution-to-parsing-error-when-uploading-pre-compiled-js/90530/1 "2023-09-26T20:57:10Z")

</div>

I’m working on a client project and I like to use vite/vue.

I kept hitting problems wherein hubspot’s own validators were throwing a bunch of parsing errors, and thus, not allowing me to publish what I KNOW is valid JS. (IMO this is a really bad feature and developers should be allowed to bypass it in favor of their own builds while still leveraging hubspots cache busting).  
I devised a solution that seems to work perfectly, but I just want to be sure this doesn’t introduce other downstream issues.  
What I did was upload the javascript file with the `.txt` extension rather than `.js`. I included it in my base template like so:  
{{ require\_js(get\_asset\_url(‘/{theme-folder}/web/dist/main.txt’), { defer: true }) }}  
It works perfectly and it successfully bypasses all of hubspot’s own Javascript processing. Is there any other potential issues I should be concerned about here?

---

<div class="post-metadata">

**Author:** ![JSiddall](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jsiddall/32/200841_2.png) [@JSiddall](https://community.hubspot.com/u/JSiddall)\
**Post date:** [December 8, 2023, 2:04am UTC](https://community.hubspot.com/t/problem-and-possible-solution-to-parsing-error-when-uploading-pre-compiled-js/90530/2 "2023-12-08T02:04:22Z")

</div>

Hey @TNorton7 ,

Your solution just saved me hours of webpack fun. I’ll be copying your solution using .txt!

thank you!!
