From 2402cead2ac9d4036e87672ce3cbaf2501adc920 Mon Sep 17 00:00:00 2001 From: Vladislav Ponomarev Date: Thu, 2 Nov 2023 03:51:33 +0500 Subject: [PATCH] .js extension for web build --- bundling/bundle-web.ts | 2 +- package.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bundling/bundle-web.ts b/bundling/bundle-web.ts index 63bce7a7..48301a35 100644 --- a/bundling/bundle-web.ts +++ b/bundling/bundle-web.ts @@ -30,7 +30,7 @@ const { code: bundledCode } = await bundle(source, { console.log("Emitting ..."); // Strip the huge inline source map which is somehow generated anyway await Deno.writeTextFile( - "../out/web.mjs", + "../out/web.js", bundledCode.replace(/\/\/# sourceMappingURL=.*\n/, ""), ); await Deno.writeTextFile( diff --git a/package.json b/package.json index fb29db46..94644774 100644 --- a/package.json +++ b/package.json @@ -37,15 +37,15 @@ ".": { "types": "./out/mod.d.ts", "node": "./out/mod.js", - "browser": "./out/web.mjs", - "default": "./out/web.mjs" + "browser": "./out/web.js", + "default": "./out/web.js" }, "./types": { "types": "./out/types.d.ts" }, "./web": { "types": "./out/web.d.ts", - "default": "./out/web.mjs" + "default": "./out/web.js" } }, "typesVersions": {