Using ES Modules
How to use ES modules using JAMStack Engine
You can use ES modules inside JAMStack to import any ES module we recommend using CDN builds or SnowPack. You can use URL imports of ES modules as well.
Example:
1
const {
2
html,
3
define,
4
store
5
} = await import("https://cdn.skypack.dev/[email protected]^4.2.1")
Copied!
As a result, the code is packed into the script of type module
Last modified 4mo ago
Copy link