Skip to content

Commit

Permalink
fix(build): avoid calling asset middleware in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Jul 26, 2024
1 parent d00eeb7 commit b747c5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/build/src/files/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ http
.createServer((req, res) => {
if (assetsMatch.test(req.url)) {
req.url = req.url.slice(7);
assets(req, res, notFound);

if (assets) {
assets(req, res, notFound);
} else {
notFound();
}
} else {
routes(req, res, notFound);
}
Expand Down

0 comments on commit b747c5c

Please sign in to comment.