I need to produce a production build without minification and uglification. Actually, I already know how to achieve this, by using options as such, in ember-cli-build.js:
var app = new EmberApp(defaults, {
'ember-cli-uglify': {
enabled: false
},
minifyJS: {
options: {
exclude: ['**/app.js']
}
}
});
The problem is that I also need to preserve the original comments of all files, or at least the ones serving as annotations.
I tried it. Unfortunately, there is only a small subset of options that are passed to Babel. Or, at least, this option should be nested in another one and I don’t know about it. Thanks!
Well, I finally got it to work, but it only does for comments inside a function. For example:
// This comment is excluded
import Object from "@ember/object"
// This one is also excluded
export default Object.create({
aMethod() {
// This comment is preserved
}
})
Not really. I think I will have to wrap everything I have inside a function only for this purpose. It would be better if I could simply insert such annotations for all files in their first line.