Skip to content

Commit

Permalink
Merge pull request #25 from risen228/chore/fix-esm-extension
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeysova authored Dec 11, 2023
2 parents f256140 + 02e3b44 commit 65eb614
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,24 @@
"Sergey Sova <[email protected]>"
],
"license": "MIT",
"main": "dist/atomic-router.cjs.js",
"module": "dist/atomic-router.esm.js",
"main": "dist/atomic-router.js",
"module": "dist/atomic-router.mjs",
"unpkg": "dist/atomic-router.umd.js",
"types": "dist/atomic-router.d.ts",
"exports": {
".": {
"types": "./dist/atomic-router.d.ts",
"import": "./dist/atomic-router.esm.js",
"require": "./dist/atomic-router.cjs.js",
"node": "./dist/atomic-router.cjs.js",
"default": "./dist/atomic-router.esm.js"
"import": "./dist/atomic-router.mjs",
"require": "./dist/atomic-router.js",
"node": "./dist/atomic-router.js",
"default": "./dist/atomic-router.mjs"
},
"./package.json": "./package.json",
"./scope": {
"types": "./scope.d.ts",
"import": "./dist/scope/atomic-router.esm.js",
"require": "./dist/scope/atomic-router.cjs.js",
"node": "./dist/scope/atomic-router.cjs.js",
"default": "./dist/scope/atomic-router.esm.js"
"import": "./dist/scope/atomic-router.mjs",
"require": "./dist/scope/atomic-router.js",
"node": "./dist/scope/atomic-router.js",
"default": "./dist/scope/atomic-router.mjs"
}
},
"files": [
Expand Down
4 changes: 4 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ export default [
file: pkg.types,
format: "es",
},
{
file: pkg.types.replace(".d.ts", ".d.mts"),
format: "es",
}
],
plugins: [resolverPlugin, dts()],
},
Expand Down

0 comments on commit 65eb614

Please sign in to comment.