Open Tokitaka opened 2 months ago
If we write simple HTML code with ES Module like below
<html>
<body>
<script src="./index.js" type="module"></script>
</body>
</html>
//index.ts
console.log("Hello parcel") ;
I hope it is bundled properly and get "Hello parcel" in console without error.
In console,
Hello parcel
index.ts:1 Uncaught ReferenceError: parcelRequire is not defined
at index.ts:1:24
at index.ts:1:24
If your script uses type="module" - remove it.
ES Module type=module cause 'parcelRequire is not defined' error