We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
.mjs
1 parent e159567 commit 5041034Copy full SHA for 5041034
packages/micro/lib/handler.js
@@ -5,7 +5,7 @@ module.exports = async file => {
5
let mod;
6
7
try {
8
- mod = file.endsWith('.mjs') ? await import(file) : await require(file); // Await to support exporting Promises
+ mod = await require(file); // Await to support exporting Promises
9
10
if (mod && typeof mod === 'object') {
11
mod = await mod.default; // Await to support es6 module's default export
0 commit comments