-
-
Notifications
You must be signed in to change notification settings - Fork 35.2k
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
Remove non ES6 builds. #25341
Remove non ES6 builds. #25341
Conversation
this pr would make the library unusable in most environments it's being used in, there's no migration path and this is immediately breaking. if you force this to be esm, it means you can't use three in anything that touches cjs, which is practically everything. this would require any other package in the end users project to be esm, which is impossible as cjs won't go away until browser esm is feature compatible, which it is not. the simplest use case is react. it can't go esm because esm can't dynamically load imports in sync (for instance dev and prod builds), that's ~20% of three npm userbase. or @brunosimon threejs journey going down. i kindly ask you to not do this. @mrdoob this is we talked about a while ago. if your wish for threejs to reach as many people as possible then this will throw most of them under the bus for no warranted reason at all. |
I guess this needs more background information since I'm not familiar with the non-esm workflows. How is it possible to use Besides, would it be sufficient to keep just |
TLDR; this breaks dual-packages and large swaths of the ecosystem which cannot go ESM-only as a response to this PR, and libraries with a peer-dependence on three.js have no option to bundle or modify three.js in any way.
It's not, people have to use pmndrs/three-stdlib over
|
If My main goal is to avoid confusion between UMD and ES6 for devs who are not using a build tool. |
Sorry for bumping this, but if that's right we will in future only have the options of importing via ES6, using build tools or going with release r156 and older? |
@HarbAlarm the available builds will be ES Module and CommonJS, that's what the whole ecosystem is moving forward to. |
@marcofugaro welp, guess i'll have to stick with r156, thanks for the reply o/ |
Related issue: -
Description
This PR removes the non ES6 builds
three.js
,three.min.js
andthree.cjs
.I have originally suggested to keep the builds a bit longer, but with
examples/js
gone, these builds admittedly have lost their significance. Furthermore, I frequently see users at the forum or stackoverflow mixing UMD builds with modules fromexamples/jsm
. This could easily be avoided by not having the above builds in the first place.The PR also cleans up the remaining references to the UMD builds. It also removes the benchmark tests like suggested in #25124 (comment) which can't be properly converted to ES6 modules anyway.