Building Angular 2 using the Angular CLI not copying assets in src

1k views Asked by At

I've been developing my current project for a while, and for the first time built for production using:

ng build --prod

Now there are font files, images, and json files (and their directories) that I had in src that are not being copied into the dist folder. If I add them manually, it works, but I can't do this every time. Did I add these files the wrong way? Do I need to specify somewhere that they should be copied? What am I missing about this? angular-cli.json is unmodified from how it was out of the box.

{
  "project": {
    "version": "1.0.0-beta.22-1",
    "name": "cl-test2"
  },
  "apps": [
    {
      "root": "src",
      "outDir": "dist",
      "assets": [
        "assets",
        "favicon.ico"
      ],
      "index": "index.html",
      "main": "main.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.json",
      "prefix": "app",
      "mobile": false,
      "styles": [
        "styles.sass"
      ],
      "scripts": [],
      "environments": {
        "source": "environments/environment.ts",
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    }
  ],
  "addons": [],
  "packages": [],
  "e2e": {
    "protractor": {
      "config": "./protractor.conf.js"
    }
  },
  "test": {
    "karma": {
      "config": "./karma.conf.js"
    }
  },
  "defaults": {
    "styleExt": "sass",
    "prefixInterfaces": false,
    "inline": {
      "style": false,
      "template": false
    },
    "spec": {
      "class": false,
      "component": true,
      "directive": true,
      "module": false,
      "pipe": true,
      "service": true
    }
  }
}
0

There are 0 answers