File tree 2 files changed +16
-2
lines changed 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -203,5 +203,12 @@ module.exports = {
203
203
// makes the discovery automatic so you don't have to restart.
204
204
// See https://github.com/facebookincubator/create-react-app/issues/186
205
205
new WatchMissingNodeModulesPlugin ( paths . appNodeModules )
206
- ]
206
+ ] ,
207
+ // Some libraries import Node modules but don't use them in the browser.
208
+ // Tell Webpack to provide empty mocks for them so importing them works.
209
+ node : {
210
+ fs : 'empty' ,
211
+ net : 'empty' ,
212
+ tls : 'empty'
213
+ }
207
214
} ;
Original file line number Diff line number Diff line change @@ -238,5 +238,12 @@ module.exports = {
238
238
} ) ,
239
239
// Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
240
240
new ExtractTextPlugin ( 'static/css/[name].[contenthash:8].css' )
241
- ]
241
+ ] ,
242
+ // Some libraries import Node modules but don't use them in the browser.
243
+ // Tell Webpack to provide empty mocks for them so importing them works.
244
+ node : {
245
+ fs : 'empty' ,
246
+ net : 'empty' ,
247
+ tls : 'empty'
248
+ }
242
249
} ;
You can’t perform that action at this time.
0 commit comments