Skip to content

Commit

Permalink
Fix CJS extension
Browse files Browse the repository at this point in the history
  • Loading branch information
corrideat committed Sep 12, 2024
1 parent dc41973 commit f2a1fb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions esbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ await Promise.resolve(
...buildOptionsBase,
format,
outExtension: {
'.js': format === 'esm' ? '.mjs' : '.js',
'.js': format === 'esm' ? '.mjs' : '.cjs',
},
plugins: [
filterListeners(undefined, ['deno', 'cloudflare-workers']),
Expand All @@ -98,7 +98,7 @@ await Promise.resolve(
format,
entryNames: 'cloudflare-workers',
outExtension: {
'.js': format === 'esm' ? '.mjs' : '.js',
'.js': format === 'esm' ? '.mjs' : '.cjs',
},
plugins: [filterListeners(['cloudflare-workers', 'dynamic'])],
});
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@apeleghq/routemate",
"version": "1.0.6",
"version": "1.0.7",
"description": "Routemate is a JavaScript router with support for various environments such as Node.js, Deno and Cloudflare Workers, with more to come.",
"type": "module",
"dist": "dist/index.js",
"main": "dist/index.js",
"dist": "dist/index.cjs",
"main": "dist/index.cjs",
"module": "./dist/index.mjs",
"exports": {
".": {
Expand All @@ -16,15 +16,15 @@
"cloudflare-workers": {
"types": "./dist/index.d.ts",
"import": "./dist/cloudflare-workers.mjs",
"require": "./dist/cloudflare-workers.mjs"
"require": "./dist/cloudflare-workers.cjs"
},
"import": "./dist/index.mjs",
"require": "./dist/index.js"
"require": "./dist/index.cjs"
},
"./cloudflare-workers": {
"types": "./dist/index.d.ts",
"import": "./dist/cloudflare-workers.mjs",
"require": "./dist/cloudflare-workers.mjs"
"require": "./dist/cloudflare-workers.cjs"
}
},
"files": [
Expand Down

0 comments on commit f2a1fb5

Please sign in to comment.