File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 33process . env . BABEL_ENV = 'production' ;
44process . env . NODE_ENV = 'production' ;
55
6+
7+ const babelIE11 = require ( './patch/babelIE11' ) ;
8+ const babelConfig = require ( 'babel-preset-react-app' ) ;
9+ babelIE11 ( babelConfig ) ;
10+
611const webpackPreact = require ( './patch/webpackPreact' ) ;
712const webpackConfig = require ( 'react-scripts/config/webpack.config.prod' ) ;
813webpackPreact ( webpackConfig ) ;
Original file line number Diff line number Diff line change 1+ // Hack babel to build for IE11 instead of IE9
2+ module . exports = babelConfig => {
3+ const presets = babelConfig . presets ;
4+ presets . forEach ( ( preset , i ) => {
5+ if ( ! Array . isArray ( preset ) ) {
6+ return ;
7+ }
8+ preset . forEach ( ( p , j ) => {
9+ if ( p . targets && p . targets . ie ) {
10+ presets [ i ] [ j ] . ie = 11 ;
11+ }
12+ } ) ;
13+ } ) ;
14+ } ;
Original file line number Diff line number Diff line change 33process . env . BABEL_ENV = 'development' ;
44process . env . NODE_ENV = 'development' ;
55
6+ const babelIE11 = require ( './patch/babelIE11' ) ;
7+ const babelConfig = require ( 'babel-preset-react-app' ) ;
8+ babelIE11 ( babelConfig ) ;
9+
610const webpackPreact = require ( './patch/webpackPreact' ) ;
711const webpackConfig = require ( 'react-scripts/config/webpack.config.dev' ) ;
812webpackPreact ( webpackConfig ) ;
You can’t perform that action at this time.
0 commit comments