{"action":"created","issue":{"url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/433","repository_url":"https://api.github.com/repos/gaearon/react-hot-loader","labels_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/433/labels{/name}","comments_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/433/comments","events_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/433/events","html_url":"https://github.com/gaearon/react-hot-loader/issues/433","id":192541405,"number":433,"title":"Configuration problems with RHL3","user":{"login":"alex-shamshurin","id":1595209,"avatar_url":"https://avatars.githubusercontent.com/u/1595209?v=3","gravatar_id":"","url":"https://api.github.com/users/alex-shamshurin","html_url":"https://github.com/alex-shamshurin","followers_url":"https://api.github.com/users/alex-shamshurin/followers","following_url":"https://api.github.com/users/alex-shamshurin/following{/other_user}","gists_url":"https://api.github.com/users/alex-shamshurin/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-shamshurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-shamshurin/subscriptions","organizations_url":"https://api.github.com/users/alex-shamshurin/orgs","repos_url":"https://api.github.com/users/alex-shamshurin/repos","events_url":"https://api.github.com/users/alex-shamshurin/events{/privacy}","received_events_url":"https://api.github.com/users/alex-shamshurin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-30T11:27:00Z","updated_at":"2016-11-30T20:49:15Z","closed_at":null,"body":"If you are reporting a bug or having an issue setting up React Hot Loader, please fill in below. For feature requests, feel free to remove this template entirely.\r\n\r\n### Description\r\n\r\nHMR is enabled but react-hot-loading works as no-ops \r\n\r\nWhat you are reporting:\r\n\r\n```\r\nprocess-update.js:81[HMR] The following modules couldn't be hot updated: (Full reload needed)\r\nThis is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. \r\nprocess-update.js:128[HMR] Reloading page\r\n```\r\n\r\n### Expected behavior\r\n\r\nModule reloading acts as in a boilerplate example\r\n\r\nWhat you think should happen:\r\n\r\nSomething wrong with entry point or with root container\r\n\r\n### Actual behavior\r\n\r\nno-ops, like usual webpack HMR\r\n\r\nWhat actually happens:\r\n\r\npage reloading\r\n\r\n### Environment\r\n\r\nReact Hot Loader version:\r\n\r\nRun these commands in the project folder and fill in their results:\r\n\r\n1. `node -v`: 7.1.0\r\n2. `npm -v`: 3.10.9\r\n\r\nThen, specify:\r\n\r\n1. Operating system: OS X\r\n2. Browser and version: Chrome latest\r\n\r\nMy config\r\n```\r\n entry     : {\r\n    app: ['react-hot-loader/patch', hotMiddlewareScript, './bootstrap.js', 'babel-polyfill', './client']\r\n  },\r\n...\r\n plugins   : [\r\n    new webpack.HotModuleReplacementPlugin(),\r\n    new webpack.NoErrorsPlugin(),\r\n    new webpack.ProvidePlugin(configWebpack.providePlugin),\r\n    new webpack.NormalModuleReplacementPlugin(/es6-promise$/, 'bluebird'),\r\n    new webpack.DefinePlugin(configWebpack.definePlugin),\r\n    new InlineEnviromentVariablesPlugin('NODE_ENV'),\r\n  ],\r\n\r\n```\r\nbabel:\r\n```\r\ntest   : /\\.js$|\\.jsx$/,\r\n      loader : 'babel-loader',\r\n      query  : function () {\r\n        var presets = ['es2015', 'react', 'stage-0'];\r\n        if (env.APP_ENV !== \"development\") {\r\n          presets.push(\"react-optimize\");\r\n        }\r\n        var plugins = [\r\n          \"transform-promise-to-bluebird\",\r\n          'transform-decorators-legacy',\r\n          \"transform-object-rest-spread\",\r\n          \"transform-react-jsx-img-import\"\r\n        ]\r\n        if (env.APP_ENV === \"development\" && !isServerConfig) {\r\n          plugins.unshift(\"react-hot-loader/babel\");\r\n        }\r\n        if (env.APP_ENV === \"development\") {\r\n          plugins.push('transform-react-jsx-source');\r\n          plugins.push('transform-react-jsx-self');\r\n        }\r\n        var cacheDirectory = env.APP_ENV === \"development\" && !isServerConfig;\r\n        return {presets: presets, plugins: plugins, cacheDirectory}\r\n      }(),\r\n      include: path.join(__dirname, '..', 'app'),\r\n      exclude: path.join(__dirname, '..', 'node_modules')\r\n```\r\nApp.js\r\n\r\n```\r\nimport {Provider} from 'react-redux';\r\nimport {Router} from 'react-router';\r\nimport WithStylesContext from './WithStylesContext';\r\n\r\nfunction App(store, routes, history, onUpdate) {\r\n  return (\r\n    <Provider store={store}>\r\n      <WithStylesContext onInsertCss={styles => styles._insertCss()}>\r\n        <Router history={history} onUpdate={onUpdate}>\r\n          {routes}\r\n        </Router>\r\n      </WithStylesContext>\r\n    </Provider>\r\n  );\r\n}\r\n\r\nexport default App;\r\n```\r\n\r\nClient.js\r\n\r\n```\r\n...\r\nconst initialState = window.__INITIAL_STATE__;\r\n\r\nconst store   = configureStore(initialState, browserHistory);\r\nconst history = syncHistoryWithStore(browserHistory, store);\r\nconst routes  = createRoutes(store);\r\n\r\nstore.runSaga(rootSaga);\r\n\r\nconst renderClient = (rootContainer, store, routes, history, onUpdate) => {\r\n  render(\r\n    <AppContainer>\r\n      {rootContainer(store, routes, history, onUpdate)}\r\n    </AppContainer>, document.getElementById('app'), () => {\r\n      if (initialRendering) {\r\n        const node = document.getElementById('server-css');\r\n        if (node) {\r\n          node.parentNode.removeChild(node);\r\n          initialRendering = false;\r\n        }\r\n      }\r\n    }\r\n  );\r\n}\r\n\r\nif (module.hot) {\r\n  module.hot.accept('./App.jsx', () => {\r\n    const NextRootContainer = require('./App.jsx').default;\r\n    renderClient(NextRootContainer, store, routes, history, onUpdate);\r\n  })\r\n}\r\n\r\nrenderClient(App, store, routes, history, onUpdate);\r\n\r\n```\r\n\r\nWhat else did I miss?\r\n"},"comment":{"url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/comments/263990920","html_url":"https://github.com/gaearon/react-hot-loader/issues/433#issuecomment-263990920","issue_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/433","id":263990920,"user":{"login":"alex-shamshurin","id":1595209,"avatar_url":"https://avatars.githubusercontent.com/u/1595209?v=3","gravatar_id":"","url":"https://api.github.com/users/alex-shamshurin","html_url":"https://github.com/alex-shamshurin","followers_url":"https://api.github.com/users/alex-shamshurin/followers","following_url":"https://api.github.com/users/alex-shamshurin/following{/other_user}","gists_url":"https://api.github.com/users/alex-shamshurin/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-shamshurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-shamshurin/subscriptions","organizations_url":"https://api.github.com/users/alex-shamshurin/orgs","repos_url":"https://api.github.com/users/alex-shamshurin/repos","events_url":"https://api.github.com/users/alex-shamshurin/events{/privacy}","received_events_url":"https://api.github.com/users/alex-shamshurin/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T20:49:15Z","updated_at":"2016-11-30T20:49:15Z","body":"```\r\nvar hotMiddlewareScript             = 'webpack-hot-middleware/client?http://localhost:3000&path=/__webpack_hmr&timeout=20000&reload=true';\r\n```"}}
{"actor":{"display_login":"alex-shamshurin"}}