-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to only have ESM in the compiled output? #984
Comments
I think I figured that I need to output all the modules I expect to exist as actual modules during the build... And I can do that myself with custom build processes.. but, I guess:
|
You can provide your own extremely minimalist "bundler" that doesn't do much bundling. This is what mho does for example, as a tech demo that's not really robust yet. The quickest way to get experimenting would be to use import maps to get bare package imports working in the browser. You will of course need to unravel layers of history, because there's a lot of stuff in the ecosystem that doesn't truly follow the module spec under the hood. |
Posting this for reference of what I'm trying to do (and so I can close the tab I had this written up in): REPL where I import from ember-resources (a v2 addon) from skypack |
This is very related to also wanting different behavior depending on whether in a classic build environment with requirejs, vs ESM-only -- but I need to be certain I can get ESM-only builds.
buuut maybe a part of bundling is de-moduling some of the on-file-system modules?
My end goal is to be able to define
import X from '@ember/whatever'
(at runtime), and have the correct module resolved -- for example, I know that@ember/service
exists at runtime -- so I should be able toimport('@ember/service')
, yeah?The text was updated successfully, but these errors were encountered: