question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom build produces files too large

See original GitHub issue

Simply trying to add OrbitControls to three.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 line

export { OrbitControls } from '../examples/jsm/controls/OrbitControls.js';

to src/Three.js and ran npm install followed by npm 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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
mrdoobcommented, Sep 23, 2020

Normal build: Screen Shot 2020-09-23 at 7 23 32 AM Added OrbitControls to src/Three.js:

Screen Shot 2020-09-23 at 7 24 18 AM

Resulting build: Screen Shot 2020-09-23 at 7 25 44 AM

1reaction
mrdoobcommented, Sep 22, 2020

Not sure this is a duplicate actually.

If I understand it correctly, what @paulmasson is trying to do is to create a new three.min.js file that has OrbitControls inside. He is adding export { OrbitControls } from '../examples/jsm/controls/OrbitControls.js'; to ./src/Three.js and because OrbitControls is importing three.module.js then the build ends up twice as big.

Once again, this wouldn’t be a problem is import maps were in browsers already.

Let me give this a try.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Production build is too large - Stack Overflow
Code splitting simply produces multiple bundels instead of one big bundle of code with all of its dependencies. We then can on send...
Read more >
gdalmerge produces file that is much too large
I'm trying to merge 60 geotiff files into one huge file in order to be able to product tiles from that resulting huge...
Read more >
My documents are too large to upload. How do I reduce the ...
First, make sure you know the file size limit for the online application you use. Depending on what you're applying for, the limit...
Read more >
Common Problems | TeamCity On-Premises Documentation
The ER_NET_PACKET_TOO_LARGE error (PacketTooBigException / Packet for query is too large) is caused by the server-side max_allowed_packet ...
Read more >
Customize your build - MSBuild - Microsoft Learn
Learn about several extensibility hooks you can use to customize MSBuild ... Build.props file, MSBuild walks the directory structure upwards ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found