Configure exportConditions
in the Rollup config
#14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've noticed that this is missing and with this change the behavior of this project template would align closer to what is being described as the webpack's default here
Webpack handles the webworker condition automatically based on the
target: 'webworker'
(this is mentioned here). A side note is your webpack template definestarget: 'web'
(here) which makes me confused as to which one is correct in context of Cloudflare Workers.If you are not sure if this has been configured correctly - I've just created a PR for
@rollup/plugin-node-resolve
with tests that verify the priority order etc for this exact combination ofexportConditions
andbrowser
options: here