Removed __source info from production builds
Brian Vaughn committed
Jun 4, 2019 at 17:03 UTC
7ef5970b2f5f65d09329fd71fbe7df9fde478d67
1 file changed
+8
-5
babel.config.js
+8
-5
@@ -25,12 +25,15 @@ module.exports = api => {
25
targets.chrome = minChromeVersion.toString();
26
targets.firefox = minFirefoxVersion.toString();
27
}
28
+ const plugins = [
29
+ ['@babel/plugin-transform-flow-strip-types'],
30
+ ['@babel/plugin-proposal-class-properties', { loose: false }],
31
+ ];
32
+ if (process.env.NODE_ENV === 'development') {
33
+ plugins.push(['@babel/plugin-transform-react-jsx-source']);
34
+ }
35
return {
29
- plugins: [
30
- ['@babel/plugin-transform-flow-strip-types'],
31
- ['@babel/plugin-proposal-class-properties', { loose: false }],
32
- ['@babel/plugin-transform-react-jsx-source'],
33
- ],
36
+ plugins,
37
presets: [
38
['@babel/preset-env', { targets }],
39
'@babel/preset-react',