From 03b8aa11bace56374382f0cf46f793ad8639d69c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Tue, 16 Nov 2021 15:38:08 +0100 Subject: [PATCH 1/2] Configure `exportConditions` in the Rollup config --- rollup.config.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 9cceb99..cafe012 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -13,5 +13,13 @@ export default { file: 'dist/index.mjs', sourcemap: true, }, - plugins: [commonjs(), nodeResolve({ browser: true }), terser()], + plugins: [ + commonjs(), + nodeResolve({ + // priority increases from left to right + exportConditions: ['browser', 'worker'], + browser: true, + }), + terser(), + ], } From f10d330486b5926843d179527692979c61e6926e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Wed, 15 Dec 2021 11:38:55 +0100 Subject: [PATCH 2/2] Remove misleading comment --- rollup.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index cafe012..a967766 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -16,7 +16,6 @@ export default { plugins: [ commonjs(), nodeResolve({ - // priority increases from left to right exportConditions: ['browser', 'worker'], browser: true, }),