Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix/css filename output #841

Merged
merged 2 commits into from
May 26, 2021
Merged

Fix/css filename output #841

merged 2 commits into from
May 26, 2021

Conversation

rschristian
Copy link
Collaborator

Fixes #779

I'd love to do / add some better detection here, but not sure how reasonable it is considering the current state of things. Ideally (in my mind at least) names would be chosen in a way resembling the following order:

  • a ".css" key in "exports"
  • "exports": { "./": { default } }
  • "exports": { "./" }, if it's a string
  • "exports", if it's a string
  • "main"
  • options.output

I believe that'd make sense as a set of fallbacks, but the point is that those would be some reasonable items to use as the CSS file name.

However, besides #784 we're not currently using "exports" for any detection / output customization so it would feel weird to have CSS be the first thing to utilize that. Certainly happy to add that if it'd make sense to do so!

@changeset-bot
Copy link

changeset-bot bot commented May 22, 2021

🦋 Changeset detected

Latest commit: 6602872

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
microbundle Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ForsakenHarmony ForsakenHarmony merged commit 0c91795 into developit:master May 26, 2021
@preact-bot preact-bot mentioned this pull request May 26, 2021
@rschristian rschristian deleted the fix/css-filename-output branch May 31, 2021 18:29
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSS output filename should not be tied to JS format
2 participants