Skip to content

Commit 06c1c9d

Browse files
committed
Add exports to package.json on 6.x branch
This is along the same lines as #6192, but for the 6.x branch. On Angular we're exploring changing our packaging to be based around ES modules and rxjs is currently a blocker, because it doesn't specify the `exports` field on the `package.json` in the 6.x branch like it does in 7.x. These changes add an identical configuration.
1 parent 881cacd commit 06c1c9d

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,44 @@
44
"description": "Reactive Extensions for modern JavaScript",
55
"main": "index.js",
66
"sideEffects": false,
7+
"exports": {
8+
".": {
9+
"node": "./index.js",
10+
"es2015": "./_esm2015/index.js",
11+
"default": "./_esm5/index.js"
12+
},
13+
"./ajax": {
14+
"node": "./ajax/index.js",
15+
"es2015": "./_esm2015/ajax/index.js",
16+
"default": "./_esm5/ajax/index.js"
17+
},
18+
"./fetch": {
19+
"node": "./fetch/index.js",
20+
"es2015": "./_esm2015/fetch/index.js",
21+
"default": "./_esm5/fetch/index.js"
22+
},
23+
"./operators": {
24+
"node": "./operators/index.js",
25+
"es2015": "./_esm2015/operators/index.js",
26+
"default": "./_esm5/operators/index.js"
27+
},
28+
"./testing": {
29+
"node": "./testing/index.js",
30+
"es2015": "./_esm2015/testing/index.js",
31+
"default": "./_esm5/testing/index.js"
32+
},
33+
"./webSocket": {
34+
"node": "./webSocket/index.js",
35+
"es2015": "./_esm2015/webSocket/index.js",
36+
"default": "./_esm5/webSocket/index.js"
37+
},
38+
"./internal/*": {
39+
"node": "./internal/*.js",
40+
"es2015": "./_esm2015/internal/*.js",
41+
"default": "./_esm5/internal/*.js"
42+
},
43+
"./package.json": "./package.json"
44+
},
745
"config": {
846
"commitizen": {
947
"path": "cz-conventional-changelog"

0 commit comments

Comments
 (0)