title: Generate production build with sourcemaps in Angular - CLI
body: <p>How to keep sourcemaps after production build?</p>
  <p>Right now, my command looks like this:</p>
  <p><code>&quot;build-prod&quot;: &quot;ng build --app=release -prod &amp;&amp; cp -R lang dist&quot;</code></p>
  <p>I tried changing it to:</p>
  <p><code>ng build --app=release --sourceMap=true -prod &amp;&amp; cp -R lang dist</code></p>
  <p>but nothing changed.</p>
  <p>If I do:
  <code>ng build --sourcemap</code> I get sourcemaps but then I get index.html instead of index.prod.html.</p>
  <p>Is it possible to edit the first command to build sourcemap files?</p>
  <p>this is my <code>tsconfig.json</code> file:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
      "compileOnSave": false,
      "compilerOptions": {
          "outDir": "./dist/out-tsc",
          "sourceMap": true,
          "declaration": false,
          "moduleResolution": "node",
          "emitDecoratorMetadata": true,
          "experimentalDecorators": true,
          "target": "es5",
          "typeRoots": [
              "node_modules/@types"
          ],
          "lib": [
              "es2017",
              "dom"
          ]
      }
  }</code></pre>
  </div>
  </div>
  </p>