Skip to content

Commit

Permalink
fix: fix module exports for Node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahsnider committed Mar 20, 2021
1 parent f3d57c9 commit 0f8a2ee
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,27 @@
],
"license": "MIT",
"main": "dist/index.js",
"module": "dist/convert.esm.js",
"type": "commonjs",
"module": "dist/convert.esm.mjs",
"exports": {
"import": "./dist/convert.esm.mjs",
"require": "./dist/index.js"
},
"name": "convert",
"repository": {
"type": "git",
"url": "https://github.com/pizzafox/convert.git"
},
"scripts": {
"analyze": "size-limit --why",
"build": "tsdx build --format cjs,esm,umd",
"build": "tsdx build --format cjs,esm,umd; yarn rename-esm",
"rename-esm": "mv ./dist/convert.esm.js ./dist/convert.esm.mjs; mv ./dist/convert.esm.js.map ./dist/convert.esm.mjs.map;",
"compat": "es-check es3 dist/*.min.js",
"docs": "typedoc",
"lint": "tsdx lint",
"size": "size-limit",
"skip": "echo skip",
"start": "tsdx watch --format cjs,esm,umd",
"start": "tsdx watch --format cjs,esm,umd --onSuccess \"yarn rename-esm\"",
"style": "prettier --check .",
"test": "tsdx test"
},
Expand Down

0 comments on commit 0f8a2ee

Please sign in to comment.