Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure exportConditions in the Rollup config #14

Merged
merged 2 commits into from Dec 15, 2021

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Nov 16, 2021

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 defines target: '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 of exportConditions and browser options: here

rollup.config.js Outdated Show resolved Hide resolved
@Andarist
Copy link
Contributor Author

Andarist commented Dec 15, 2021

@threepointone could we land this too? :)

Copy link
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@threepointone threepointone merged commit 6764530 into cloudflare:master Dec 15, 2021
@Andarist Andarist deleted the export-conditions branch December 15, 2021 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants