Bundles from previous builds end up in the out-dir even if removed from code
Problem
When specifying --out-dir on dx bundle, after all things are precompressed and renamed, it just copies the content of the /target/dx/release/.../web/public/ folder, without any kind of check if that folder contains weird artifacts from previous builds
Steps To Reproduce
Steps to reproduce the behavior:
- Put in assets that you want in the code
- bundle the app with --out-dir
- remove said assets from the code
- bundle again, the out dir contains the removed assets
The removed assets will be found in the out-dir
Expected behavior
the out-dir should contain the correctly tree-shaked values from how assets are handled, and not contain junk from previous builds
Or just some good documentation explaining how to fix this
Environment:
- Dioxus version: 0.7
- OS info: Linux, x64_32
- App platform: web
Bumping this, same exact issue also occurs on a windows box. Even if you clean out_dir.
My workaround for this is to remove all the assets in the target release directory in my build script
rm docs/assets/*
rm target/dx/tamichat/release/web/public/assets/*
dx bundle --out-dir docs --release
cp -r docs/public/* docs
rm -rf docs/public
cp docs/index.html docs/404.html