Uncaught ReferenceError: react is not defined
codeatrajan opened this issue · comments
Hi,
I have added a new Package npm i react-idle-timer
and updated the webpack.config.js for adding CDN
case 'react-idle-timer':
return {
name: packageName,
var: 'react-idle-timer',
version: packageVersion,
url: https://unpkg.com/react-idle-timer@${packageVersion}/dist/index.cjs.js
,
};
But after deploying getting ReferenceError: react is not defined
so whether I have to add react also in webpack.config.js
Can you try some of the solutions offered in #204? For example, start with not externalizing this package in production, and then experiment with different versions of react and react-dom.