Skip to content

Remove dev step from tooling builds (reducing memory pressure) and copy the minified file to a max.js file for backwards compat #16760

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

georginahalpern
Copy link
Contributor

Originally our build commands for our tools were running both dev and prod, outputted an unminified max.js file during CI. This impacted memory usage during build and is not necessary for debugging since we offer source maps.

This PR removes the dev step from our builds, so we won't be outputting the unminified max.js files anymore. But in order to preserve backwards compatibility for users who may have been referencing the .max.js file directly, we now copy the minified file to a .max.js file after the build is complete. This plugin will only run if the minToMax option is set to true in the webpack configuration.

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Graph tools CI has failed you can find the test results at:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/TOOLS/refs/pull/16760/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Building or testing the sandbox has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/16760/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Building or testing the playground has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/16760/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Reviewer - this PR has made changes to one or more package.json files.

@deltakosh deltakosh requested a review from RaananW June 17, 2025 18:58
@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Building or testing the sandbox has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/16760/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Building or testing the playground has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/16760/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Graph tools CI has failed you can find the test results at:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/TOOLS/refs/pull/16760/merge/testResults/

path.join missing in the 'from' var
@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/16760/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/16760/merge/?snapshot=refs/pull/16760/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/16760/merge/

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jun 17, 2025

@georginahalpern
Copy link
Contributor Author

@RaananW if this looks good to you feel free to publish/merge!

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎆

@RaananW
Copy link
Member

RaananW commented Jun 17, 2025

I assumed initial that https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16760/merge/babylon.max.js will be minified, but it isn't. should it be?...

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are missing the changes to core/loaders/materials in the UMD directory. They are using webpack as well. No need to do it for the es6 core packages, but UMD is needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolve this comment after adding the changes to the core UMD packages :-)

@georginahalpern
Copy link
Contributor Author

I assumed initial that https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16760/merge/babylon.max.js will be minified, but it isn't. should it be?...

@RaananW this PR doesn't impact babylon.max.js -- its only doing the change for the tools at first

figured it was safer than enabling for all ? and see if we get any complaints?

@RaananW
Copy link
Member

RaananW commented Jun 18, 2025

I assumed initial that https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16760/merge/babylon.max.js will be minified, but it isn't. should it be?...

@RaananW this PR doesn't impact babylon.max.js -- its only doing the change for the tools at first

figured it was safer than enabling for all ? and see if we get any complaints?

If that's enough to mitigate the memory issue, I'm good with it 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants