Skip to content

Instantly share code, notes, and snippets.

@alexdiliberto
Last active November 7, 2017 08:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexdiliberto/b9f7f6fab58ce7bd399cd7e92b420a8e to your computer and use it in GitHub Desktop.
Save alexdiliberto/b9f7f6fab58ce7bd399cd7e92b420a8e to your computer and use it in GitHub Desktop.
Strip all console statements from a production ember application
/* eslint-env node */
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
let env = EmberApp.env();
let plugins = [];
if (env === 'production') {
plugins.push('transform-remove-console');
}
let app = new EmberApp(defaults, {
// Add options here
babel: {
plugins
}
});
return app.toTree();
};
yarn add -D babel-plugin-transform-remove-console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment