Production build hangs indefinitely
$ ember -v
version: 0.2.7
node: 1.8.1
npm: 2.11.0
Repro steps:
$ ember new whatever
$ cd whatever
$ ember install ember-ckeditor
$ ember build -e production
The last command hangs with 100% CPU consumption.
It will eventually finish (I've seen it take 20-30 mins), but this seems to be caused by the uglify stage + the plugins js files (I suspect the language files). We use a whitelist for including files which isn't a very good option for a generic addon.
ckAssets = new Funnel('bower_components/ckeditor', {
srcDir: '/',
include: [
'ckeditor.js',
'adapters/jquery.js',
'styles.js',
'config.js',
'contents.css',
'lang/en.js',
'plugins/widget/plugin.js',
'plugins/widget/lang/en.js',
'plugins/autogrow/plugin.js',
'plugins/**/*.png',
'plugins/**/*.gif'],
destDir: '/assets/ckeditor'
});
@dustyjewett sorry to be a pain, what is your complete setup for doing it your way? I've done this but now I just get 'CKEDITOR is not defined', so clearly I have to attach it to the window somewhere, but not sure where.
That's the base (we do more because we have our own plugins and skin).
Make sure you include the tree at the bottom of the brocfile:
module.exports = app.toTree([ckAssets]);
I was bitten by this one today as well. I've used @dustyjewett's solution with slight modifications. Still takes a while though.
Found it to be fingerprinting... Updated ember-cli-build.js to include:
var app = new EmberApp(defaults, {
// Add options here
fingerprint: {
exclude: ['ckeditor'],
ignore: ['ckeditor']
}
});
Found it to be fingerprinting... Updated
ember-cli-build.jsto include:var app = new EmberApp(defaults, { // Add options here fingerprint: { exclude: ['ckeditor'], ignore: ['ckeditor'] } });
Using these settings allows for you to revert back to the included:
treeForPublic: function(tree) {
return new Funnel(this.project.bowerDirectory + '/ckeditor', {
srcDir: '/',
destDir: '/assets/ckeditor'
});
},
and build times are back to normal. The updates are in my fork with some additional alterations that I've made for my specific situation. You can check them out here and if you want them I can submit a pull request.
+1 on this issue...Still having it too after trying the fixes... What can I do to solve this problem correctly? I need fast build times for production..
+100 on this issue, took ages to see why my heroku build was failing
Using:
var app = new EmberApp(defaults, {
// Add options here
fingerprint: {
exclude: ['ckeditor'],
ignore: ['ckeditor']
}
});
I'm currently running my fork of this repo and build times are normal.
Yes @ChrisHonniball this solves the issue thanks.. if we think of looking at this thread.
👍 I've added a comment about it to my repo however I've branched off quite a bit from this repo so I'm not sure if the updates will be needed/wanted in this repo.