File tree 3 files changed +25
-3
lines changed
3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 43
43
"babel-loader" : " ^6.1.0" ,
44
44
"babel-preset-es2015" : " ^6.1.18" ,
45
45
"body-parser" : " ^1.14.1" ,
46
- "bootstrap-loader" : " ^1.0.0-rc " ,
46
+ "bootstrap-loader" : " file:../../. " ,
47
47
"css-loader" : " ^0.22.0" ,
48
48
"eslint" : " ^1.9.0" ,
49
49
"eslint-config-airbnb" : " ^1.0.0" ,
Original file line number Diff line number Diff line change 51
51
"babel-preset-es2015" : " ^6.3.13" ,
52
52
"babel-preset-react" : " ^6.3.13" ,
53
53
"body-parser" : " ^1.14.1" ,
54
- "bootstrap-loader" : " ^1.0.0-rc " ,
54
+ "bootstrap-loader" : " file:../../. " ,
55
55
"css-loader" : " ^0.23.0" ,
56
56
"eslint" : " ^1.9.0" ,
57
57
"eslint-config-airbnb" : " ^1.0.0" ,
Original file line number Diff line number Diff line change 1
1
/* eslint func-names: 0 */
2
2
3
- import 'babel-polyfill' ;
3
+ import semver from 'semver' ;
4
+
5
+ // For Node <= v0.12.x Babel polyfill is required
6
+ if ( semver . lt ( process . version , '4.0.0' ) ) {
7
+ const babelLatest = 'babel-polyfill' ;
8
+ const babelPrev = 'babel/polyfill' ;
9
+
10
+ const isBabelLatest = require . resolve ( babelLatest ) ;
11
+ const isBabelPrev = require . resolve ( babelPrev ) ;
12
+
13
+ if ( ! isBabelLatest && ! isBabelPrev ) {
14
+ throw new Error ( `
15
+ For Node <= v0.12.x Babel polyfill is required.
16
+ Make sure it's installed in your 'node_modules/' directory.
17
+ ` ) ;
18
+ }
19
+
20
+ if ( isBabelLatest ) {
21
+ require ( babelLatest ) ;
22
+ } else {
23
+ require ( babelPrev ) ;
24
+ }
25
+ }
4
26
5
27
import path from 'path' ;
6
28
import loaderUtils from 'loader-utils' ;
You can’t perform that action at this time.
0 commit comments