Comments (4)
Thanks for the issue but this isn't a problem with koa-webpack
. Rather, this is an issue with webpack-hot-client
.
You should also resolve this error:
「hot」: WebSocket Server Error { Error: listen EADDRINUSE 127.0.0.1:8081
It's very relevant, actually. If you have another socket server running off of different/other settings, it's going to mess up the instance you're trying to run. I'd recommend passing a different port to the hot
settings, or making sure you're closing the koa-webpack
middleware instance. The assumption that a separate instance of koa-webpack, and subsequently webpack-hot-client, wouldn't try to start a new socket server is a poor one - that's a core function of the module, and essential when running multiple instances.
Looking at webpack-hot-client
, we can see that the module does actually disable HMR: https://github.com/webpack-contrib/webpack-hot-client/blob/master/lib/client/index.js#L31 in the traditional sense, and instead reloads the page should an update be detected. That's the behavior that the hot
option dictates. If you wanted to disable full page reload, you'd have to use the reload: false
option, which currently appears to be ignored. However, if you don't want any refresh when an HMR patch is detected, then you should use webpack-dev-middleware directly, as 50% of koa-webpack's usefulness is then moot.
from koa-webpack.
Thanks for the reply. What I meant was that it seems the other server listening on 8081 must be an existing webpack-hot-clien websockets server that didnt get closed when I SIGINT’ed my previous run of the script.
At any rate you’re right, I should simply just use webpack-dev-middleware. Thank you for the advice and help.
from koa-webpack.
['dev'] is an invalid additional property? why?
from koa-webpack.
@liubin915249126 it's considered poor form to ask an off-topic question in an issue thread. Please do have a read about Github etiquette. Your question is what is called "thread jacking." Read the README, that's not a valid option.
from koa-webpack.
Related Issues (20)
- Incorrect check for publicPath HOT 2
- koa-webpack for server side rendering HOT 2
- res.getHeader function missing for webpack-dev-middleware HOT 5
- Can I get a simple, up-to-date and working example for hot-reloading? HOT 11
- Problem with [email protected] HOT 1
- Upgrade `joi` HOT 1
- Set devMiddleware filesystem HOT 1
- compile error
- HotModuleReplacementPlugin is automatically added to compilers
- Hot client does not work when server is using docker Error during WebSocket handshake: net::ERR_CONNECTION_RESET #374 HOT 1
- Question: how to use with lerna/yarn workspaces monorepo HOT 1
- How to use the package in typescript? HOT 3
- support for webpack 5 HOT 6
- unable to import koa-webpack into lerna monorepo HOT 1
- unable to import koa-webpack in lerna monorepo HOT 2
- Webpack 5 is not support? HOT 1
- please update for webpack 5 ^^
- webpack 5 HOT 1
- Webpack 5 support
- Uncaught TypeError: Cannot read property 'MethodFactory' of undefined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from koa-webpack.