-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Do something about ES6 exporting #803
Comments
I would suggest switching to exporting ES6, which is well supported in recent browser and node versions. |
(partial) list of projects that depend on js-sdk, whose build we could potentially break: https://www.npmjs.com/package/matrix-js-sdk?activeTab=dependents |
+1 to ES6 and bumping the version |
Seems reasonable: the implication of this, of course, is that we stop babel-ing our source files (unless we need to babel down to ES6) since if we are exporting ES6 we might as well export everything in ES6. |
This is a somewhat experimental PR to make the build process target ES6 rather than ES5 given ES6 is now widely supported. #803
Can I hop in to this? |
I’d suggest to use rollup with its plugins. Also it’ll allow to bundle browser version inside Currently we need to download it from github releases which is really inconvenient. Another benefit from ES6 version is that during development of client web app, unused functionality will be shakes out |
#931 has added a tiny amount of ES 6 (via the dependency This issue remains though, because we haven't yet started exporting ES 6 for the SDK's own code. When we do so, it will no longer be a breaking change, so most likely a MINOR version will be appropriate. |
Recently we're starting to want to pull in libraries that export, or have dependencies that export, ES6. As far as I can tell, there are no guidelines or structure whatsoever in NPM / the JS ecosystem on what language NPM modules are exported as, and now that any vaguely recent node version and all modern browsers support ES6, the answer increasingly seems to be ES6 rather than ES5.
Our options are:
The text was updated successfully, but these errors were encountered: