0
votes

I have Ember-CLI-application with a few thousand static assets (~1GB) and my build time is now about 30sec. I have tried in my Brocfile.js without success:

var app = new EmberApp({
fingerprint: {
  enabled: false, 
  exclude: ['large_folder']
}

});

Build time with assets: TreeMerger | 29738ms / without: TreeMerger | 9182ms.

Any ideas how to speed up the build? (Ember-CLI 0.1.7)

2
Here's an approach for Ember 2.x through at least 3.x (written as of Ember 3)handlebears

2 Answers

0
votes

You have enabled:false, you can set it to true.

Also, on exclude, would be better to say the path for the folder, such as:

If you have a large folder inside images, then you can do it like this:

fingerprint: {
  exclude: ['assets/images/large_folder/', 'assets/uploads/other_large_folder/]
}
0
votes

My own solution is currently to use the postBuild-hook and a symbolic link to the assets folder.

lib/link-after-build/index.js:

var fs = require('fs');
var path = require('path'); 

module.exports = {
  name: 'link-after-build',

  // link additional assets after build
  postBuild: function(result) {

    if (process.env.EMBER_ENV === 'development') {

      var buildDirPath = result.directory;

      var srcpath = path.resolve("/opt/local/apache2/htdocs/large_folder");
      var dstpath = path.resolve(buildDirPath + "/large_folder");
      fs.symlinkSync(srcpath,dstpath);
    }
  }

};