We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54cbe8c commit 3aa155bCopy full SHA for 3aa155b
scripts/rollup/packaging.js
@@ -180,6 +180,15 @@ function filterOutEntrypoints(name) {
180
i--;
181
unlinkSync(`build/node_modules/${name}/${filename}`);
182
changed = true;
183
+ // Remove it from the exports field too if it exists.
184
+ const exportsJSON = packageJSON.exports;
185
+ if (exportsJSON) {
186
+ if (filename === 'index.js') {
187
+ delete exportsJSON['.'];
188
+ } else {
189
+ delete exportsJSON['./' + filename.replace(/\.js$/, '')];
190
+ }
191
192
}
193
194
if (changed) {
0 commit comments