Thanks for creating this template!
Creating the release build, as specified in the readme, shows this warning:
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
fonts/fa-solid-900.svg (775 KiB)
images/pfbg_992@2x.jpg (575 KiB)
images/pfbg_768@2x.jpg (354 KiB)
images/pfbg_2000.jpg (270 KiB)
main.js (1.17 MiB)
main.wasm (2.04 MiB)
Notably: main.wasm (2.04 MiB)
I checked the Yew optimizations guide (https://yew.rs/advanced-topics/optimizations#cargotoml) and was able to reduce it to 1.17 MB by adding this to the cargo.toml:
[profile.release]
# less code to include into binary
panic = 'abort'
# optimization over all codebase ( better optimization, slower build )
codegen-units = 1
# optimization for size ( more aggressive )
opt-level = 'z'
# optimization for size
# opt-level = 's'
# link time optimization using using whole-program analysis
lto = true
Still, 1.17 MB seems large (without all the assets). Would it be feasible to work on optimizing this template (including e.g. inspecting the binary with Twiggy)?
Thanks for creating this template!
Creating the release build, as specified in the readme, shows this warning:
Notably:
main.wasm (2.04 MiB)I checked the Yew optimizations guide (https://yew.rs/advanced-topics/optimizations#cargotoml) and was able to reduce it to
1.17 MBby adding this to the cargo.toml:Still, 1.17 MB seems large (without all the assets). Would it be feasible to work on optimizing this template (including e.g. inspecting the binary with Twiggy)?