For now, we have 2 available implementations, which we tried and compared to the bundled module.
The main takeaways, so far, are:
- To execute a script or load an external file and execute it as a module use
.jsextension cannot be omitted in the
import(the exact URL should be provided)
- the modules’ scope is not global and
thisdoesn’t refer to anything
- native modules are in the strict mode by default (not needed to provide
- module scripts are deferred by default (like
In this article, we are going to understand other differences with the bundled modules, abilities to interact with the module scripts, how to rewrite Webpack modules to native ES ones and other tips and tricks....