Angular CLI: 6.0.0-rc.0
Node: 8.10.0
OS: linux x64
Angular: 6.0.0-rc.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cdk: 6.0.0-rc.0
@angular/cli: 6.0.0-rc.0
@angular/material: 6.0.0-rc.0
@angular-devkit/architect: 0.0.10
@angular-devkit/build-angular: 0.0.10
@angular-devkit/build-optimizer: 0.4.9
@angular-devkit/core: 0.4.9
@angular-devkit/schematics: 0.5.0
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 6.0.0-beta.9
typescript: 2.7.2
webpack: 4.1.0
"apps": [
{
// …
"assets": [
"assets",
"favicon.ico"
]
}
]
(assets is a folder and favicon.ico is a file)
ng update @angular/cli --migrate-only --from=1.7.1 as requestedangular.json is created with entries like this under projects/my-project/architect/build/options:
"assets": [
{
"glob": "assets",
"input": "/src",
"output": "/"
},
{
"glob": "favicon.ico",
"input": "/src",
"output": "/"
},
Which does not match the desired files in both cases
I had to change it to this:
"assets": [
{
"glob": "assets/**",
"input": "src",
"output": "/"
},
{
"glob": "favicon.ico",
"input": "src",
"output": "/"
},
Would just like to chime in that we need to fix it to be this instead:
{
"glob": "**/*",
"input": "src/assets",
"output": "/assets"
},
The difference is that the former would copy what was inside src/assets to /, whereas the latter copies it to /assets.
@filipesilva can I share my .angular-cli.json with you, because I sacred on ng update command :)
I have two app dev&prod, only difference are "allowOutsideOutDir" in prod to get /assets once in dist
@istiti you can save your work before running the update command, and if something goes wrong you just discard the changes in git. They won't be automatically committed.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Would just like to chime in that we need to fix it to be this instead:
The difference is that the former would copy what was inside
src/assetsto/, whereas the latter copies it to/assets.