We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48ec521 commit 72d0ae0Copy full SHA for 72d0ae0
src/node/plugin-island/config.ts
@@ -118,8 +118,11 @@ export function pluginConfig(
118
configureServer(server) {
119
return async () => {
120
// Serve public dir
121
- if (await fs.pathExists(PUBLIC_DIR)) {
122
- server.middlewares.use(sirv(path.join(config.root, PUBLIC_DIR)));
+ // Cause by the pre-bundle problem, we have to set the island package as the root dir
+ // So we need to serve the public dir in user's root dir manually
123
+ const publicDir = path.join(config.root, PUBLIC_DIR);
124
+ if (await fs.pathExists(publicDir)) {
125
+ server.middlewares.use(sirv(publicDir));
126
}
127
};
128
0 commit comments