In isomorphic react app I have myModule
which should behave differently on node and browser environments. I would like configure this split point i
It has been a long time since this question was asked. I just want to clarify the previous answer.
If you look at tools/webpack.config.js in React Starter Kit you will see that it exports two Webpack configurations that slightly differ, e.g. module.exports = [clientConfig, sererConfig]. The server-side bundle config has this field target set to node (by default it's web).
It seems this webpack beheavior is not documented, but webpack automatically takes 'main' entry when target is 'node' and takes 'browser' entry when target is 'web'.