-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hi, I'm trying to build two bundles for server and for client by exporting array of objects from Rspack config file
Both bundles has index
in entry
, also:
- Server code output path is
dist/server
- Client code output path is
dist/client
My devServer config looks like:
{
devServer: {
hot: false,
proxy: [
{
context: ['/api'],
target: 'http://localhost:1234',
pathRewrite: {
'^/api': '',
},
},
],
devMiddleware: {
writeToDisk: true,
},
static: {
directory: path.resolve(import.meta.dirname, 'dist/client'),
},
}
}
But when I running npx rspack serve
it serves both of client and server bundles.
As a result http://localhost:8080/index.mjs
returns server bundle instead client bundle
Is devServer.static.directory works? How can i serve only dist/client
instead of dist
?
Metadata
Metadata
Assignees
Labels
No labels