cli: dist/static does not include assets if Angular project is output to dist/
See original GitHub issue🐞 Bug report
Description
In dist/static, I have the following
- index.html
- assets
- scully-routes.json
My webmanifest.manifest
, favicon.ico
, sitemap.xml
, robots.txt
, etc aren’t available on my static site. It seems like all of this stuff is configured in the angular.json
and part of my build in dist/
, so it seems like Scully should copy that over for the static site? Or is there some other step or approach that I’m missing?
🔬 Minimal Reproduction
- Generate a new app with the CLI
- Follow the Scully docs
- Check to see if your
favicon.ico
loads on your static site and that it’s indist/static/favicon.ico
💻Your Environment
Angular Version:
Angular CLI: 9.0.0-rc.6
Node: 12.13.0
OS: darwin x64
Angular: 9.0.0-rc.6
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.900.0-rc.6
@angular-devkit/build-angular 0.900.0-rc.6
@angular-devkit/build-optimizer 0.900.0-rc.6
@angular-devkit/build-webpack 0.900.0-rc.6
@angular-devkit/core 9.0.0-rc.6
@angular-devkit/schematics 9.0.0-rc.6
@angular/cdk 9.0.0-rc.5
@angular/fire 5.2.3
@angular/material 9.0.0-rc.5
@ngtools/webpack 9.0.0-rc.6
@schematics/angular 9.0.0-rc.6
@schematics/update 0.900.0-rc.6
rxjs 6.5.3
typescript 3.6.4
webpack 4.41.2
Scully Version:
"@scullyio/init": "0.0.8",
"@scullyio/ng-lib": "latest",
"@scullyio/scully": "latest",
🔥 Exception or Error
GET http://localhost:5000/firebase-performance-es2015.js net::ERR_ABORTED 404 (Not Found)
(index):2790 GET http://localhost:5000/runtime-es2015.js net::ERR_ABORTED 404 (Not Found)
4(index):2790 GET http://localhost:5000/polyfills-es2015.js net::ERR_ABORTED 404 (Not Found)
16(index):2762 GET http://localhost:5000/assets/DevIntentLogo.png 404 (Not Found)
(index):2790 GET http://localhost:5000/assets/material-design-icons/MaterialIcons-Regular.woff2 net::ERR_ABORTED 404 (Not Found)
(index):2792 GET http://localhost:5000/assets/material-design-icons/MaterialIcons-Regular.woff net::ERR_ABORTED 404 (Not Found)
(index):1 GET http://localhost:5000/assets/material-design-icons/MaterialIcons-Regular.ttf net::ERR_ABORTED 404 (Not Found)
manifest.webmanifest:1 GET http://localhost:5000/manifest.webmanifest 404 (Not Found)
manifest.webmanifest:1 Manifest: Line: 1, column: 1, Syntax error.
favicon.ico:1 GET http://localhost:5000/favicon.ico 404 (Not Found)
favicon-32x32.png:1 GET http://localhost:5000/assets/favicon-32x32.png 404 (Not Found)
favicon-16x16.png:1 GET http://localhost:5000/assets/favicon-16x16.png 404 (Not Found)
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (16 by maintainers)
Top Results From Across the Web
Angular CLI assets folder not going into dist folder
You use the assets array inside the build target in angular.json to list files or folders you want to copy as-is when building...
Read more >Angular CLI: Different ways to include assets - Łukasz Nojek
This approach has a disadvantage: after building, the asset will go to app/component1/assets folder in the dist folder:
Read more >Introducing Scully: A Static Site Generator - Academind
Scully let's you generate static sites based on Angular, utilizing all of Angular's power but still giving you ALL the SEO benefits static ......
Read more >How To Build a Jamstack Portfolio with Angular 11 and Scully
This tutorial was created using Angular CLI v11.2.14. ... If the project does not have a preview URL, you can just omit it....
Read more >Create powerful fast pre-rendered Angular Apps using Scully ...
Good to know: Scully does not use Angular Universal for the ... checked our app, it will add the generated static assets to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OK, I changed my project to output to
dist/web
instead ofdist/
inangular.json
and I now get the😄 new Angular build imported
and my assets are all properly copied.I also have the same issue and this workaround worked.