I have been following along the guide to make Webpack work with React.NET (at https://reactjs.net/guides/webpack.html), and one of my requirements is to have third party libraries in a separate bundle. For this, I've made use of the CommonsChunkPlugin found at https://webpack.js.org/guides/code-splitting-libraries/.
Trying this setup with client side rendering seems to work alright, but can't still figure out how to do the same for server side rendering. I would always see the error Error while loading "~/Scripts/build/bundle.js": ReferenceError: webpackJsonp is not defined
.
I'm fairly new to this Webpack world, but managed to realize that webpackJsonp
variable is registered at the window
level, which I'm guessing the server side rendering engines have no access to. Is this the case? Is there any workarounds for this issue?
Thanks a lot in advance!