mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-20 21:42:38 +08:00
This update introduces the ability for users to define the locations for storing `media`, `browser`, and `server` files. You can achieve this by utilizing the extended `outputPath` option. ```json { "projects": { "my-app": { "architect": { "build": { "builder": "@angular-devkit/build-angular:application", "options": { "outputPath": { "base": "dist/my-app", "browser": "", "server": "node-server", "media": "resources" } } } } } } } ``` While not recommended, choosing to set the `browser` option empty will result in files being output directly under the specified `base` path. It's important to note that this action will generate certain files like `stats.json` and `prerendered-routes.json` that aren't intended for deployment in this directory. **Validation rules:** - `browser` and `server` are relative to the configuration set in the `base` option. - When SSR is enabled, `browser` cannot be set to an empty string, and cannot be the same as `server`. - `media` is relative to the value specified in the `browser` option. - `media` cannot be set to an empty string. - `browser`, `media`, or `server` cannot contain slashes. Closes: #26632 and closes: #26057