From 29881ee8ac1e516dfc0c1b13b69df859b7916749 Mon Sep 17 00:00:00 2001 From: Gray Zhang Date: Mon, 10 Jan 2022 20:50:40 +0800 Subject: [PATCH 1/3] Add exports field to react-refresh's package.json --- packages/react-refresh/package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react-refresh/package.json b/packages/react-refresh/package.json index d5295574058..2010c3f3cc4 100644 --- a/packages/react-refresh/package.json +++ b/packages/react-refresh/package.json @@ -18,6 +18,10 @@ "umd/" ], "main": "runtime.js", + "exports": { + ".": "./runtime.js", + "./babel": "./babel.js" + }, "repository": { "type": "git", "url": "https://github.com/facebook/react.git", @@ -31,4 +35,4 @@ "react-dom-16-8": "npm:react-dom@16.8.0", "scheduler-0-13": "npm:scheduler@0.13.0" } -} \ No newline at end of file +} From fc43577d9f64356fe4c98a12b43a312c379132ad Mon Sep 17 00:00:00 2001 From: Gray Zhang Date: Mon, 10 Jan 2022 21:45:31 +0800 Subject: [PATCH 2/3] Update package.json --- packages/react-refresh/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-refresh/package.json b/packages/react-refresh/package.json index 2010c3f3cc4..83ee18129cc 100644 --- a/packages/react-refresh/package.json +++ b/packages/react-refresh/package.json @@ -20,7 +20,8 @@ "main": "runtime.js", "exports": { ".": "./runtime.js", - "./babel": "./babel.js" + "./babel": "./babel.js", + "./package.json": "./package.json" }, "repository": { "type": "git", From f0ad60890447deb01f53de455effa7a03acce73b Mon Sep 17 00:00:00 2001 From: Gray Zhang Date: Tue, 11 Jan 2022 10:44:16 +0800 Subject: [PATCH 3/3] Add runtime to exports --- packages/react-refresh/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-refresh/package.json b/packages/react-refresh/package.json index 83ee18129cc..c52b4f7fd8b 100644 --- a/packages/react-refresh/package.json +++ b/packages/react-refresh/package.json @@ -20,6 +20,7 @@ "main": "runtime.js", "exports": { ".": "./runtime.js", + "./runtime": "./runtime.js", "./babel": "./babel.js", "./package.json": "./package.json" },