When Deploying a web app using Vite, I am unable to deploy the .js file. Getting the below issue.
$ vite build
vite v2.8.6 building for production...
**\<script src="/index.js"\> in "/index.html" can't be bundled without type="module" attribute**
transforming...
I cannot use in script type=module
as I have no import of code to be done. If I use then error is coming.
If anyone can help.
I tried using script type=module
but error is coming. Is there any way I can deploy with Vite without using type=module
?
type="module"
? Generally, errors that that attribute causes should not be too hard to fix. – Junkothis
to equalwindow
, expect top levelvar
declarations to be global properties onwindow
, etc). I don't want to edit to those libraries to make them work withtype="module"
, they do their job just fine when included via a classic<script>
. – Payday