diff options
| author | Jason Miller <[email protected]> | 2021-06-23 16:40:45 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-06-23 16:40:45 -0400 |
| commit | f3990ec5e34477d2fc21644c91a64d7a0bc004c1 (patch) | |
| tree | 569d157e1afb1e9deb14fbe594591e0a7ebd54ab /package.json | |
| parent | ec0aab7de2474b9592c177c19e5c839c74196394 (diff) | |
Add Package Exports configuration (#139)
* Add Package Exports configuration (semver major)
* Update compressed-size.yml
Diffstat (limited to 'package.json')
| -rw-r--r-- | package.json | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/package.json b/package.json index 666ffe7..767bbca 100644 --- a/package.json +++ b/package.json @@ -2,20 +2,24 @@ "name": "mitt", "version": "2.1.0", "description": "Tiny 200b functional Event Emitter / pubsub.", - "jsnext:main": "dist/mitt.es.js", - "source": "src/index.ts", - "module": "dist/mitt.es.js", - "esmodules": "dist/mitt.modern.js", + "module": "dist/mitt.mjs", "main": "dist/mitt.js", + "jsnext:main": "dist/mitt.mjs", "umd:main": "dist/mitt.umd.js", + "source": "src/index.ts", "typings": "index.d.ts", + "exports": { + "import": "./dist/mitt.mjs", + "require": "./dist/mitt.js", + "default": "./dist/mitt.mjs" + }, "scripts": { "test": "npm-run-all --silent typecheck lint mocha test-types", "mocha": "mocha test", "test-types": "tsc test/test-types-compilation.ts --noEmit --strict", "lint": "eslint src test --ext ts --ext js", "typecheck": "tsc --noEmit", - "bundle": "microbundle", + "bundle": "microbundle -f es,cjs,umd", "build": "npm-run-all --silent clean -p bundle -s docs", "clean": "rimraf dist", "docs": "documentation readme src/index.ts --section API -q --parse-extension ts", |
