postcss-bundler: conditional style
exports support
#1543
Labels
feature request
New feature or request
style
exports support
#1543
What would you want to propose?
Greetings,
I'm currently trying to use
postcss-bundler
to import styles coming from a package declaring entry points and conditional exports: https://nodejs.org/api/packages.html#conditional-exportsThe package exports:
The CSS file importing from the package:
Currently resulting in a
CSSSyntaxError
because it picks up the commonjs file./dist/tokens.cjs
.I understand though that the
style
condition is not yet "standardized"?Sass already honor the
sass
one though.Suggested solution
Not exactly sure yet, will dive more into the code. Happy to get advises.
But given that
postcss-bundler
is aimed at CSS, supporting thestyle
condition seems like a good addition.Alternatively just add support for the
style
key atpackage.json
root. (likepostcss-import
).Additional context
Some references:
Validations
Would you like to open a PR for this feature?
The text was updated successfully, but these errors were encountered: