I have a static site built with vanilla HTML, CSS. No libraries, build steps, or backend. I recently added a new feature that I use JS for. Wrote my JS in an ES module, linked to it (<script src="..." type="module"></script>
) in my HTML document <head>
. Everything worked as expected when testing it locally, and in a branch deploy preview. When I merged the branch into master, the new code deployed, but the ES module is not loaded. Firefox throws 2 errors in the console…
and chrome throws…
The deployed site is here: https://nicolaos.dev
The branch preview running the same code is working correctly: https://deploy-preview-6--dev-nicolaos.netlify.com/
The site is open source, all the code including the simple netlify.toml
file can be seen here: https://github.com/dev-nicolaos/portfolio
I don’t understand why it’s not working, this seems like it should be the simplest site ever to deploy.