Can I use ECMAScript modules in Ember CLI addon blueprints?
The blueprints of one of the addons I maintain (
ember-bootstrap) depends on another package (
chalk) which is shipped as an ECMAScript module in recent versions. Wonder if there is any way to upgrade.
What I tried out but didn’t succeed:
- Convert to static
importtreating the file as an ECMAScript module.
import()with top-level await.
Both failed. But I haven’t deeply looked into it. Wondering if any of them is officially supported. Or should we stay with legacy CommonJS modules for now?