Skip to content

Commit 5041034

Browse files
authored
Revert "Native ES modules import for .mjs (#448)" (#459)
This reverts commit 06a0162.
1 parent e159567 commit 5041034

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/micro/lib/handler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = async file => {
55
let mod;
66

77
try {
8-
mod = file.endsWith('.mjs') ? await import(file) : await require(file); // Await to support exporting Promises
8+
mod = await require(file); // Await to support exporting Promises
99

1010
if (mod && typeof mod === 'object') {
1111
mod = await mod.default; // Await to support es6 module's default export

0 commit comments

Comments
 (0)