mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Removed __source info from production builds
This commit is contained in:
+8
-5
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user