bundlejs
bundlejs copied to clipboard
`config` query string sometimes removed after clicking "Build" button
Description:
When clicking the Build button, the config query string in the URL is sometimes removed unexpectedly. This doesn’t happen consistently—I'd estimate it occurs around 50% of the time.
The issue seems to occur more reliably when:
- The URL includes both
configandbundlequery strings. - The Build button is clicked while the initial auto-build (triggered on page load) is still in progress.
I've attached a video to demonstrate the behavior. Please watch the Chrome address bar closely after clicking the Build button.
Here’s an example link to reproduce the issue: https://bundlejs.com/?q=%40szhsin%2Freact-accordion&treeshake=%5B*%5D&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22react-dom%22%5D%7D%7D&bundle
Impact:
Because the config query string is removed, the bundle size calculation is incorrect. For example:
- With the
configquery string, the bundle size is 2.92 kB (gzip) - Without the
configquery string, the bundle size jumps to 6.11 kB (gzip)
Expected Behavior:
The config query string should remain in the URL after clicking the Build button.
https://github.com/user-attachments/assets/6954a27d-fe53-4f32-80e9-feae0f13f882