Last active
November 7, 2017 08:34
-
-
Save alexdiliberto/b9f7f6fab58ce7bd399cd7e92b420a8e to your computer and use it in GitHub Desktop.
Strip all console statements from a production ember application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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(); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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