Exclude assets in production build
Inside your angular.json
there is a configurations object projects.{project-name}.architect.build.configurations
.
Set the assets
inside the prod entry to []
"production": {
//...
"assets": []
}
This is untested though, but by judging from what I know from the configuration file, this should be possible.
This will make any build and serve with the production flag to exclude the assets. If you really want all the builds, no matter the environment, to build without assets, you move the assets
array from projects.{project-name}.architect.build.options
to the projects.{project-name}.architect.serve.options
and set the one in build
to an empty array.