Skip to content
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

Concatenation issue #1133

Open
LeXXik opened this issue Mar 29, 2024 · 2 comments
Open

Concatenation issue #1133

LeXXik opened this issue Mar 29, 2024 · 2 comments

Comments

@LeXXik
Copy link

LeXXik commented Mar 29, 2024

Creating worker fails, when Launcher is started with "Concatenate Scripts" option:

image

Related forum: https://forum.playcanvas.com/t/new-worker-causing-build-fail/35411
Repro: https://playcanvas.com/project/1204252/overview/concatenation-issue

@leonidaspir
Copy link

leonidaspir commented Mar 29, 2024

I think that works as expected given all preloaded scripts will be included in the concatenated script file.

Does setting preload = false to the worker script fix this? That's the proposed way to treat worker script files on production builds too. There is rarely a reason to preload worker scripts since the worker will request the files separately.

@LeXXik
Copy link
Author

LeXXik commented Mar 29, 2024

Yes, it works correctly without concatenation. In our production builds, we download non-concatenated build and concatenate/minify it ourselves, so we have a control over what is concatenated.

Still could be useful in Launcher, when the project has many scripts, as loading is much faster with concatenated option in that case. Perhaps a boolean property could be added to script asset to be excluded from concatenation.

Edit:
Leonidas, your suggestion on the forums is a good one, so adding here for record - the workaround would be to set the worker script preload to false.

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

No branches or pull requests

2 participants