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
22 changes: 1 addition & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ app.use(
app.listen(3000, () => console.log("Example app listening on port 3000!"));
```

See [below](#other-servers) for an example of use with fastify.
See [below](#other-servers) for examples of use with other servers.

## Options

Expand Down Expand Up @@ -685,26 +685,6 @@ process.on("unhandledRejection", (err) => {
});
```

### 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.

```js
const { devMiddleware } = require("@rspack/dev-middleware");
const fastify = require("fastify")();
const { rspack } = require("@rspack/core");
const rspackConfig = require("./rspack.config.js");

const compiler = rspack(rspackConfig);
const devMiddlewareOptions = {
// options
};

await fastify.register(require("@fastify/express"));
await fastify.use(devMiddleware(compiler, devMiddlewareOptions));
await fastify.listen(3000);
```

### Hono

```js
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"bump": "npx bumpp"
},
"devDependencies": {
"@fastify/express": "^4.0.2",
"@hapi/hapi": "^21.3.7",
"@hono/node-server": "^1.12.0",
"@rslib/core": "^0.20.0",
Expand All @@ -48,7 +47,6 @@
"deepmerge": "^4.2.2",
"execa": "^5.1.1",
"express": "^5.1.0",
"fastify": "^5.2.1",
"file-loader": "^6.2.0",
"finalhandler": "^2.1.0",
"hono": "^4.4.13",
Expand Down
Loading