Skip to content

Commit

Permalink
Removed __source info from production builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Jun 5, 2019
1 parent 1afc83e commit 7ef5970
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ module.exports = api => {
targets.chrome = minChromeVersion.toString();
targets.firefox = minFirefoxVersion.toString();
}
const plugins = [
['@babel/plugin-transform-flow-strip-types'],
['@babel/plugin-proposal-class-properties', { loose: false }],
];
if (process.env.NODE_ENV === 'development') {
plugins.push(['@babel/plugin-transform-react-jsx-source']);
}
return {
plugins: [
['@babel/plugin-transform-flow-strip-types'],
['@babel/plugin-proposal-class-properties', { loose: false }],
['@babel/plugin-transform-react-jsx-source'],
],
plugins,
presets: [
['@babel/preset-env', { targets }],
'@babel/preset-react',
Expand Down

0 comments on commit 7ef5970

Please sign in to comment.