You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would need to check it with a few apps too see if anyone is replying on deep imports from the react package, and will the way the dist version of react-dom loads react work as expected?
I know off-hand that Enzyme would need react-dom/serve aliased too, while react-addons-test-utils is just a deep import into react/lib/ReactTestUtils, but this config would initially only be happening when running a hot-reloading development server.
The text was updated successfully, but these errors were encountered:
I use this in prod and there is little caveat. Just setting alias won't improve performance, it also should be added to 'noParse' and to make it work with reactDom or Router imports loader has to be used:
/* tells webpack to skip parsing following libraries
requires use of "import loader" for certain modules, based on https://github.com/christianalfoni/react-webpack-cookbook/issues/30
*/
noParse: [ pathToReact, pathToReactDom, pathToReactRouter ],
loaders: [{
test: pathToReactDOM,
loader: 'imports'
}, {
test: pathToReactRouter,
loader: 'imports'
}, {....
Good idea from facebook/create-react-app#164 to increase development perf by reducing the number of modules.
Would need to check it with a few apps too see if anyone is replying on deep imports from the react package, and will the way the dist version of
react-dom
loadsreact
work as expected?NormalModuleReplacementPlugin
is also an option if there are any problems.I know off-hand that Enzyme would need
react-dom/serve
aliased too, whilereact-addons-test-utils
is just a deep import intoreact/lib/ReactTestUtils
, but this config would initially only be happening when running a hot-reloading development server.The text was updated successfully, but these errors were encountered: