From 9f1142f8a8df481c88ddedba0c19a6afa756f405 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 23 Sep 2021 23:08:22 +0200 Subject: [PATCH] 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. --- package.json | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/package.json b/package.json index 0cc4c075c16..083fc57542a 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,37 @@ "description": "Reactive Extensions for modern JavaScript", "main": "index.js", "sideEffects": false, + "exports": { + ".": { + "node": "./index.js", + "default": "./_esm5/index.js" + }, + "./ajax": { + "node": "./ajax/index.js", + "default": "./_esm5/ajax/index.js" + }, + "./fetch": { + "node": "./fetch/index.js", + "default": "./_esm5/fetch/index.js" + }, + "./operators": { + "node": "./operators/index.js", + "default": "./_esm5/operators/index.js" + }, + "./testing": { + "node": "./testing/index.js", + "default": "./_esm5/testing/index.js" + }, + "./webSocket": { + "node": "./webSocket/index.js", + "default": "./_esm5/webSocket/index.js" + }, + "./internal/*": { + "node": "./internal/*.js", + "default": "./_esm5/internal/*.js" + }, + "./package.json": "./package.json" + }, "config": { "commitizen": { "path": "cz-conventional-changelog"