mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 20:02:40 +08:00
Previously, the Vite-based development server that is automatically used with the `application` and `browser-esbuild` builders would always use prebundling if the Angular CLI caching was enabled. The development server now has a specific `prebundle` option to allow more control over prebundling while still allowing other forms of caching within the Angular CLI. The `prebundle` option can be a boolean value of `true` or `false` that will enable or disable prebundling, respectively. Additionally, the option also has an object long-form. This long-form enables prebundling and currently contains one property named `exclude`. The `exclude` property supports cases where a package should not be prebundled and rather should be bundled directly into the application code. These cases are not common but can happen based on project specific requirements. If the `prebundle` option is enabled when using the `browser` builder or any other Webpack-based builder, it will be ignored as the Webpack-based development server does not contain such functionality.