React - Minified exception occurred

前端 未结 10 1426
离开以前
离开以前 2020-12-09 07:54

I have React js installed via NPM and using browserify to manage components in react. When an exception occurs in React, the console shows as

\"Uncau

10条回答
  •  暖寄归人
    2020-12-09 08:09

    If you are encountering this issue with Karma + Webpack, the following Webpack configuration fixed the issue for me when running tests:

    plugins: [
        new webpack.DefinePlugin({
            'process.env': {
                NODE_ENV: JSON.stringify('development')
            }
        })
    ]
    

提交回复
热议问题