dont use mjs extension for ES modules, some (most) servers serve them with the wrong mimetype

This commit is contained in:
Bruno Windels 2020-08-18 12:16:51 +02:00
parent 054ba8d17d
commit 520dac7cec

View file

@ -183,7 +183,7 @@ async function buildJs() {
name: `${PROJECT_ID}Bundle`
});
const code = output[0].code;
const bundlePath = resource(`${PROJECT_ID}.mjs`, code);
const bundlePath = resource(`${PROJECT_ID}.js`, code);
await fs.writeFile(bundlePath, code, "utf8");
return bundlePath;
}