Skip to content

Commit 62e2efe

Browse files
authored
fix: use the same id for importing and checking error (#1984)
1 parent 68f5e82 commit 62e2efe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runtime/src/templates/edge/next-dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const handler = async (req, context) => {
3535
try {
3636
// We need to cache-bust the import because otherwise it will claim it
3737
// doesn't exist if the user creates it after the server starts
38-
const nextMiddleware = await import(`../../middleware.js#${idx++}`)
38+
const nextMiddleware = await import(`../../middleware.js#${++idx}`)
3939
middleware = nextMiddleware.middleware
4040
} catch (importError) {
4141
// Error message is `Module not found "file://<path>/middleware.js#123456".` in Deno

0 commit comments

Comments
 (0)