Skip to content

Production Build Vendor Files Missing #785

@mb-jenks

Description

@mb-jenks

I've added d3.js to my project and mapped it according to the documentation. Everything works fine with the dev builds, but when I try to build for production 'ng build -prod' , the d3 files are not copied to the /dist folder. Here's my system-config.ts and angular-cli-build.js.

/***********************************************************************************************
 * User Configuration.
 **********************************************************************************************/
/** Map relative paths to URLs. */
const map: any = {
  'd3': 'vendor/d3/d3.js'
};

/** User packages configuration. */
const packages: any = {
};
var Angular2App = require('angular-cli/lib/broccoli/angular2-app');

module.exports = function(defaults) {
  return new Angular2App(defaults, {
    vendorNpmFiles: [
      'systemjs/dist/system-polyfills.js',
      'systemjs/dist/system.src.js',
      'zone.js/dist/*.js',
      'es6-shim/es6-shim.js',
      'reflect-metadata/*.js',
      'rxjs/**/*.js',
      '@angular/**/*.js',
      'd3/d3.js'
    ]
  });
};

My app is unable to run in production mode because of this. Any idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions