Disable error overlay in development mode

前端 未结 11 976
长情又很酷
长情又很酷 2020-11-30 08:08

Is there a way to disable the error overlay when running a create-react-app in development mode?

This is the overlay I\'m talking about:

I\'m askin

11条回答
  •  情话喂你
    2020-11-30 08:47

    In the file webpack.config.js, comment the line:

     // require.resolve('react-dev-utils/webpackHotDevClient'),
    

    And uncomment:

    require.resolve('webpack-dev-server/client') + '?/',
    require.resolve('webpack/hot/dev-server'),
    

    In the file webpackDevServer.config.js, comment:

    // transportMode: 'ws',
    // injectClient: false,
    

提交回复
热议问题