File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -203,5 +203,12 @@ module.exports = {
203203 // makes the discovery automatic so you don't have to restart.
204204 // See https://github.com/facebookincubator/create-react-app/issues/186
205205 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+ }
207214} ;
Original file line number Diff line number Diff line change @@ -238,5 +238,12 @@ module.exports = {
238238 } ) ,
239239 // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
240240 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+ }
242249} ;
You can’t perform that action at this time.
0 commit comments