I have a shared folder where reusable React components are stored. I want to make Hot Reload working with that directory, but it doesn't work. Here is the folder structure I have:
|__shared
|__src
|__package.json
Somehow Webpack HotModuleReplacement plugin is not triggering re-load when something is changing in a /shared
folder?
The entry in webpack.config looks like this:
entry: [
"eventsource-polyfill",
"webpack-hot-middleware/client?reload=true",
path.join(process.cwd(), "src/app.js"),
]
Hot in the app:
if (module.hot) {
module.hot.accept('./reducers', () => {
console.log('done')
})
}
The app is bootstrapped with react-boilerplate
.