Skip to content

Commit 74d4f83

Browse files
authored
Add exports field to package.json (#18)
1 parent 530ded7 commit 74d4f83

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased](unreleased)
9+
10+
- Add `unpkg`, `jsdelivr` and `exports` fields to package.json
11+
([#18](https://github.com/kriasoft/hyperapp-render/pull/18)).
12+
813
## [3.2.0] - 2020-05-14
914

1015
- Add support for `Lazy` component from Hyperapp v2

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,24 @@
1919
"module": "node/module.js",
2020
"types": "src/node.d.ts",
2121
"esnext": "src/node.js",
22+
"unpkg": "hyperapp-render.min.js",
23+
"jsdelivr": "hyperapp-render.min.js",
2224
"browser": {
2325
"node/index.js": "./browser/index.js",
2426
"node/module.js": "./browser/module.js",
2527
"src/node.d.ts": "./src/browser.d.ts",
2628
"src/node.js": "./src/browser.js"
2729
},
30+
"exports": {
31+
"node": {
32+
"import": "./node/module.js",
33+
"require": "./node/index.js"
34+
},
35+
"default": {
36+
"import": "./browser/module.js",
37+
"require": "./browser/index.js"
38+
}
39+
},
2840
"dependencies": {
2941
"@types/node": "*"
3042
},

0 commit comments

Comments
 (0)