-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Custom build produces files too large #20387
Comments
If you are using examples that are ES modules (anything from |
@donmccurdy my use case requires I produce a final |
three.js has three possible versions of the core library:
Files from |
Not sure this is a duplicate actually. If I understand it correctly, what @paulmasson is trying to do is to create a new Once again, this wouldn't be a problem is import maps were in browsers already. Let me give this a try. |
I think #20389 should work? |
@mrdoob thanks for understanding the issue! I did a shallow clone of the rollup branch, added the line for OrbitControls and built. Unfortunately file size is still double what it should be... |
Strange. I tested it yesterday and worked fine. I'll merge it and test again. |
@mrdoob well this is strange. The process works just fine on a Mac but not on a Windows machine. Both are using the same latest versions of Node and npm. On the Windows machine the file
Are there known issues in this process for Windows 10? Would like to be able to have this work anywhere. |
@mrdoob and the version built on a Mac currently errors out with
|
No idea where that's coming from... |
This errror message has disappeared using a fresh copy of today's dev, so something got fixed somewhere. Incidentally the build process now produces messages like these:
|
With a fresh copy of today's dev, which includes the regex, the error message now is
Unfortunately the resulting build is still twice the expected size. Since I can build on a Mac, you may not care to pursue the Windows error. |
Yes, we definitely broke that build: #20411
That's okay. We can live with that.
I guess I'll have to get a Windows machine 😕 |
@mrdoob one final facet of this issue: the minified file used to contain a nice version reference of the form |
We sitched from Google Closure Compiler to Terser. I'm not sure it's something we can control. |
Simply trying to add
OrbitControls
tothree.min.js
by following the instructions in the Wiki. Working from a fresh clone of the master branch of r120 on a Windows 10 machine with current Node and npm. Added the lineexport { OrbitControls } from '../examples/jsm/controls/OrbitControls.js';
to
src/Three.js
and rannpm install
followed bynpm run build-closure
. The resulting file is twice as big as expected, and further runs of the build keep increasing file sizes. Either something critical is missing from the Wiki instructions or there is an error somewhere.The text was updated successfully, but these errors were encountered: