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

game_wasm.js is no longer minified #8831

Open
AGulev opened this issue Apr 23, 2024 · 2 comments
Open

game_wasm.js is no longer minified #8831

AGulev opened this issue Apr 23, 2024 · 2 comments
Assignees
Labels
bug Something is not working as expected engine Issues related to the Defold engine html5 Issue related to the HTML5 platform

Comments

@AGulev
Copy link
Contributor

AGulev commented Apr 23, 2024

Describe the bug (REQUIRED)
It seems like game_wasm.js is no longer minified after emscripten update, more info is available on forum:
https://forum.defold.com/t/defold-1-8-0-beta/76535/78?u=agulev

Defold version (REQUIRED):

  • Version 1.8.0
@AGulev AGulev added bug Something is not working as expected html5 Issue related to the HTML5 platform labels Apr 23, 2024
@ekharkunov ekharkunov self-assigned this Apr 23, 2024
@britzl britzl added the engine Issues related to the Defold engine label Apr 29, 2024
@ekharkunov
Copy link
Contributor

I researched on test project (simple .c file) and got following results:

There are two workarounds:

  1. Modify emscripten code and run closure-compiler after babel compiler. It need to add additional options to waf_dynamo.py and build_input.yml
  2. Add babel-preset-minify package to emscripten and modify emscripten code in following way:
cmd = shared.get_npm_cmd('babel') + [filename, '-o', outfile, '--presets', '@babel/preset-env,babel-preset-minify',  '--config-file', config_file]

Issue at emscripten project:
emscripten-core/emscripten#21881

@ekharkunov
Copy link
Contributor

Fixes were made emscripten-core/emscripten#21882. Waits for official release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working as expected engine Issues related to the Defold engine html5 Issue related to the HTML5 platform
Projects
None yet
Development

No branches or pull requests

3 participants