Commit dbc5efc
committed
build(esbuild): refine configuration logic for development and production modes
This commit optimizes the ESBuild configuration files to improve the build process behavior between development and production environments.
Key changes:
- In `Target.js`: Changed the `treeShaking` option from a static `true` value to conditional logic based on the development mode (`!t` where `t` represents the `On` flag). This ensures tree shaking is disabled in development mode for better debugging and enabled in production for optimal bundle size.
- In `Wind.js`: Refactored the conditional logic for cleaning the output directory from a switch statement to a more concise boolean check (`!0===(r===!0) &&`), making the code more readable and maintainable while preserving the same functionality.
The modifications ensure that the build system behaves correctly according to the environment (development vs. production), with development mode (`On=true`) disabling tree shaking for debugging and production mode (`On=false`) enabling it for optimization. The variable renaming in `Target.js` (from `i` to `t`) and loop variable adjustments maintain consistency and prevent potential naming conflicts.1 parent ef5da42 commit dbc5efc
2 files changed
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments