I am not clearly understanding why the nomodule attribute exists in the new browsers that support ES6 modules.
In HTML 5, the type attribut
As other answers mentioned, This Boolean attribute is set to indicate that the script should not be executed in browsers that support ES2015 modules — in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code.
Now let's understand with an example.
I'm using es6/ES2015 features and need to include core.js to run application in IE browser and other major browser like chrome, firefox, safari are supporting es6/ES2015 features. You can see total vender size will be 150kb for IE browser.
// around 45kb after gzip
// around 100kb after gzip
why should I load core.js & obserpoly.js (45kb+5kb = 50kb) in other browsers. I have used nomodule attribute with my script and it worked like a champ. Now, Core.js and obserPoly.js scripts load in IE browsers only.
// around 45kb after gzip
// around 100kb after gzip