Bug in module.hot.accept: _Uncaught SyntaxError: missing ) after argument list ......... bundle.js:46413_
bundle.js
if (true) {
module.hot.accept("./src/ProcessReissue/dev.jsx""./src/ProcessReissue/dev.jsx", function(__WEBPACK_OUTDATED_DEPENDENCIES__) { /* harmony import */ __WEBPACK_IMPORTED_MODULE_3__dev__ = __webpack_require__("./src/ProcessReissue/dev.jsx"); (function(__WEBPACK_OUTDATED_DEPENDENCIES__) { /* harmony import */ __WEBPACK_IMPORTED_MODULE_3__dev__ = __webpack_require__("./src/ProcessReissue/dev.jsx"); (1)(__WEBPACK_OUTDATED_DEPENDENCIES__); })(__WEBPACK_OUTDATED_DEPENDENCIES__); }, function () {
render(__WEBPACK_IMPORTED_MODULE_3__dev__["default"]);
});
}
this "./src/ProcessReissue/dev.jsx""./src/ProcessReissue/dev.jsx" should be "./src/ProcessReissue/dev.jsx"
What you think should happen: browser should show "Hello"
What actually happens:
React Hot Loader version: [email protected]
Run these commands in the project folder and fill in their results:
node -v: 7.1.0npm -v: 3.10.9Then, specify:
src/ProcessReissue/hot.jsx
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import App from './dev';
const render = (Component) => {
ReactDOM.render(
<AppContainer>
<Component />
</AppContainer>,
document.getElementById('application')
);
};
render(App);
module.hot.accept('./dev', () => {
render(App);
});
src/ProcessReissue/dev.jsx
import * as React from 'react';
const App = () => (
<h2>Hello</h2>
);
export default App;
webpack.config.js
entry = [
'react-hot-loader/patch',
path.resolve(__dirname, 'src/ProcessReissue/hot.jsx')
];
I got the same error, cause i applied the HotModuleReplacementPlugin twice. 1. with --hot and 2. in plugins
Hope to help
@yexingxia thank you, it helps!
@yexingxia thank you, it helps!!!
@yexingxia thanks !!!
Most helpful comment
I got the same error, cause i applied the HotModuleReplacementPlugin twice. 1. with --hot and 2. in plugins
Hope to help