Skip to content

Commit

Permalink
Merge pull request #4 from kapouer/esm
Browse files Browse the repository at this point in the history
Export an actually working es6 module
  • Loading branch information
miraclx authored Jan 8, 2021
2 parents 2a48ae4 + eb839b7 commit d799f65
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
"version": "1.6.2",
"description": "Parse bytes to human readable sizes (4747) → ('4.75 KB') and vice versa.",
"main": "dist/index.js",
"exports": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"types": "typings/index.d.ts",
"scripts": {
"test": "jest",
"build": "babel lib -d dist",
"build": "babel lib -d dist && (cat dist/index.js; printf '\nexport default xbytes;') > dist/index.mjs",
"preversion": "npm run build",
"version": "npm test",
"postversion": "git push gitlab master && git push github master"
Expand Down

0 comments on commit d799f65

Please sign in to comment.