-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Prepare for ES Modules #1379
Comments
As there is actual no decision to do this now*, here are arguments: Pro:
Contra:
|
I think, now that we have everything running through a TS compile step, it would now be easy to provide ESM for the packages of this monorepo. Not sure, if this should be a priority for next controller @AlCalzone @Apollon77 @GermanBluefox https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html |
In fact just building it will not bring us any step further. We need to find out how to make our adapter approach ESM compatible, what this means for adapter-core, how we handle compact mode :-) (and such - and I did not started with javascript adapter and esm deps gg) ... So yes if starting with this it makes sense to also build ESM :-) but I think this is just the beginning fo the story |
I think internally it should be fine now. Compact mode is covered in #1667 and the general Adapter approach needs to be done in adapter-core. So could this be closed or anything in the context of this ticket open? For adapter-core we have a start at ioBroker/adapter-core#576 |
Node 12.16+ supports the new EcmaScript modules and more and more packages are migrating. Currently all of them are also offering a CommonJS export, but that could change with time. At some point we will have to deal with that - meaning a migration of JS-Controller to ESM.
Helpful resources:
The text was updated successfully, but these errors were encountered: