File tree 2 files changed +19
-6
lines changed
2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
2
3
- require ( "webpack-cli" ) ;
3
+ let webpackCliInstalled = false ;
4
+ try {
5
+ require . resolve ( "webpack-cli" ) ;
6
+ webpackCliInstalled = true ;
7
+ } catch ( e ) {
8
+ webpackCliInstalled = false ;
9
+ }
10
+
11
+ if ( webpackCliInstalled ) {
12
+ require ( "webpack-cli" ) ; // eslint-disable-line node/no-unpublished-require
13
+ } else {
14
+ console . error ( "The CLI moved into a separate package: webpack-cli." ) ;
15
+ console . error ( "Please install 'webpack-cli' in addition to webpack itself to use the CLI." ) ;
16
+ console . error ( "-> When using npm: npm install webpack-cli -D" ) ;
17
+ console . error ( "-> When using yarn: yarn add webpack-cli -D" ) ;
18
+ process . exitCode = 1 ;
19
+ }
Original file line number Diff line number Diff line change 11
11
"async" : " ^2.1.2" ,
12
12
"enhanced-resolve" : " 4.0.0-beta.2" ,
13
13
"eslint-scope" : " ^3.7.1" ,
14
- "interpret" : " ^1.0.0" ,
15
14
"loader-runner" : " ^2.3.0" ,
16
15
"loader-utils" : " ^1.1.0" ,
17
16
"memory-fs" : " ~0.4.1" ,
18
17
"mkdirp" : " ~0.5.0" ,
19
18
"node-libs-browser" : " ^2.0.0" ,
20
19
"schema-utils" : " ^0.4.2" ,
21
20
"source-map" : " ^0.5.3" ,
22
- "supports-color" : " ^4.2.1" ,
23
21
"tapable" : " ^1.0.0-beta.5" ,
24
22
"uglifyjs-webpack-plugin" : " ^1.1.1" ,
25
23
"watchpack" : " ^1.4.0" ,
26
- "webpack-cli" : " ^1.5.2" ,
27
- "webpack-sources" : " ^1.0.1" ,
28
- "yargs" : " ^8.0.2"
24
+ "webpack-sources" : " ^1.0.1"
29
25
},
30
26
"license" : " MIT" ,
31
27
"devDependencies" : {
68
64
"url-loader" : " ~0.5.0" ,
69
65
"val-loader" : " ^1.0.2" ,
70
66
"vm-browserify" : " ~0.0.0" ,
67
+ "webpack-cli" : " ^1.5.2" ,
71
68
"webpack-dev-middleware" : " ^1.9.0" ,
72
69
"worker-loader" : " ^0.8.0"
73
70
},
You can’t perform that action at this time.
0 commit comments