File tree Expand file tree Collapse file tree 5 files changed +18
-5
lines changed Expand file tree Collapse file tree 5 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "env" : {
3+ "production" : {
4+ "plugins" : [" transform-remove-console" ]
5+ }
6+ }
7+ }
Original file line number Diff line number Diff line change 1- module . exports = function override ( config , env ) {
2- //do stuff with the webpack config...
3- console . log ( 'config overrides: ' , env ) ;
4- return config ;
5- } ;
1+ const { useBabelRc, override } = require ( 'customize-cra' ) ;
2+
3+ module . exports = override ( useBabelRc ( ) ) ;
Original file line number Diff line number Diff line change 66 "@testing-library/jest-dom" : " ^4.2.4" ,
77 "@testing-library/react" : " ^9.3.2" ,
88 "@testing-library/user-event" : " ^7.1.2" ,
9+ "babel-plugin-transform-remove-console" : " ^6.9.4" ,
910 "customize-cra" : " ^0.9.1" ,
1011 "node-sass" : " ^4.13.0" ,
1112 "react" : " ^16.12.0" ,
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import logo from './logo.svg';
33import './App.scss' ;
44
55function App ( ) {
6+ console . log ( "This console will be remove in Production mode" ) ;
7+
68 return (
79 < div className = "App" >
810 < header className = "header" >
Original file line number Diff line number Diff line change @@ -2067,6 +2067,11 @@ babel-plugin-transform-react-remove-prop-types@0.4.24:
20672067 resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.24.tgz#f2edaf9b4c6a5fbe5c1d678bfb531078c1555f3a"
20682068 integrity sha512-eqj0hVcJUR57/Ug2zE1Yswsw4LhuqqHhD+8v120T1cl3kjg76QwtyBrdIk4WVwK+lAhBJVYCd/v+4nc4y+8JsA==
20692069
2070+ babel-plugin-transform-remove-console@^6.9.4 :
2071+ version "6.9.4"
2072+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz#b980360c067384e24b357a588d807d3c83527780"
2073+ integrity sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A=
2074+
20702075babel-preset-jest@^24.9.0 :
20712076 version "24.9.0"
20722077 resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz#192b521e2217fb1d1f67cf73f70c336650ad3cdc"
You can’t perform that action at this time.
0 commit comments