Skip to content

🎥 Make videos programmatically with React

fix bundler

Jonny Burger55afd72caf73
diff --git a/packages/bundler/src/start-server.ts b/packages/bundler/src/start-server.ts
index 27fb0e497b..ccc042d08c 100644
--- a/packages/bundler/src/start-server.ts
+++ b/packages/bundler/src/start-server.ts
@@ -45,7 +45,6 @@ export const startServer = async (
});
const compiler = webpack(config);
- app.use(express.static(path.join(__dirname, '..', 'web')));
app.use(webpackDevMiddleware(compiler));
app.use(
webpackHotMiddleware(compiler, {
@@ -72,7 +71,7 @@ export const startServer = async (
app.use('*', (req, res) => {
res.type('text/html');
- res.end(indexHtml.replace(/%PUBLIC_PATH%/g, options?.publicPath ?? '/'));
+ res.end(indexHtml.replace(/%PUBLIC_PATH%/g, options?.publicPath ?? ''));
});
const desiredPort = options?.port ?? Internals.getServerPort();
diff --git a/packages/cli/src/preview.ts b/packages/cli/src/preview.ts
index 7ce33dafab..64b29f791e 100644
--- a/packages/cli/src/preview.ts
+++ b/packages/cli/src/preview.ts
@@ -29,7 +29,7 @@ export const previewCommand = xns(async () => {
inputProps,
envVariables,
port: desiredPort,
- publicPath: '/',
+ publicPath: '',
}
);
betterOpn(`http://localhost:${port}`);