Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,25 @@ app.use(devMiddleware(compiler, devMiddlewareOptions));
app.listen(3000, () => console.log("Example app listening on port 3000!"));
```

### Koa

```js
const Koa = require("koa");
const webpack = require("webpack");
const webpackConfig = require("./test/fixtures/webpack.simple.config");
const middleware = require("./dist");

const compiler = webpack(webpackConfig);
const devMiddlewareOptions = {
/** Your webpack-dev-middleware-options */
};
const app = new Koa();

app.use(middleware.koaWrapper(compiler, devMiddlewareOptions));

app.listen(3000);
```

### Hapi

```js
Expand Down Expand Up @@ -613,10 +632,6 @@ process.on("unhandledRejection", (err) => {
});
```

### Koa

Soon...

### Fastify

Fastify interop will require the use of `fastify-express` instead of `middie` for providing middleware support. As the authors of `fastify-express` recommend, this should only be used as a stopgap while full Fastify support is worked on.
Expand Down
224 changes: 224 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"husky": "^9.0.10",
"jest": "^29.3.1",
"joi": "^17.12.2",
"koa": "^2.15.2",
"lint-staged": "^15.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.2.4",
Expand Down
Loading