DEV Community

Calin Baenen
Calin Baenen

Posted on


Can I disable the automatic deferring of module-scripts without the `async` attribute?

So, I read this short article on using ES6 modules in the browser, and it says this:

Scripts of type module are deferred by default. But you can override that behaviour with making them async. (Psst, confused between deferred and async again? Here you go.)

But, I don't want my script to be deferred OR asynchronous.
So, is it possible I could do something around the lines of:?

<script defer="false" type="module" src="main.js">
Enter fullscreen mode Exit fullscreen mode


Top comments (0)

🌙 Dark Mode?!

Turn it on in Settings