I am creating a web site with Angular2@2.1.2. I am using Webpack with default settings (as a dependency).
Here is my package.json
\"dependencies\": {
I have found my solution in this issue: https://github.com/angular/angular-cli/issues/1942
robots.txt is in src/ directory
Modify angular-cli.json
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": ["assets", "robots.txt"],
....
Use the assets array to declare files you want to be placed in the root of dist/