Importing the packages through ESM will leverage ember-auto-import under the hood, although that addon can be "hidden" from the user by importing the right Babel config through the addon to enable dynamic imports.
This does mean that the user will need to import the package themselves, for example:
import { defineCustomElements } from 'whatever-stencil-bundle';
defineCustomElements(window);
I tend to like it when Ember addons can abstract away behavior like this, but on the other hand, I also like keeping it explicit -- especially if things change for Stencil in the future and the definition behavior is different later on. ember-cli-stencil would be totally decoupled from that, which might be a benefit.
Closes #5
There are currently a few issues blocking this PR:
Importing the packages through ESM will leverage
ember-auto-import
under the hood, although that addon can be "hidden" from the user by importing the right Babel config through the addon to enable dynamic imports.This does mean that the user will need to import the package themselves, for example:
I tend to like it when Ember addons can abstract away behavior like this, but on the other hand, I also like keeping it explicit -- especially if things change for Stencil in the future and the definition behavior is different later on.
ember-cli-stencil
would be totally decoupled from that, which might be a benefit.Closes #5
There are currently a few issues blocking this PR: