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

fix: support ESM version of postcss.config.js #614

Merged
merged 2 commits into from Nov 29, 2022

Conversation

alexander-akait
Copy link
Member

@alexander-akait alexander-akait commented Nov 29, 2022

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Allow to load ESM configuration, tests are impossible due bugs and unstable ESM working in jest, so tested manually

Breaking Changes

No

Additional Info

Fixes #613

@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Base: 93.14% // Head: 89.33% // Decreases project coverage by -3.80% ⚠️

Coverage data is based on head (c95cd70) compared to base (f1729f8).
Patch coverage: 44.44% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #614      +/-   ##
==========================================
- Coverage   93.14%   89.33%   -3.81%     
==========================================
  Files           5        5              
  Lines         321      347      +26     
  Branches      106      113       +7     
==========================================
+ Hits          299      310      +11     
- Misses         20       34      +14     
- Partials        2        3       +1     
Impacted Files Coverage Δ
src/utils.js 85.10% <44.44%> (-5.33%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alexander-akait alexander-akait merged commit 955085f into master Nov 29, 2022
@alexander-akait alexander-akait deleted the fix-allow-postcss-config-be-esm branch November 29, 2022 20:16
@its-me-VOID
Copy link

its-me-VOID commented Nov 10, 2023

postcss.config.mjs silently fail, as if the config wasn't specified.
I think this PR didn't bring support of esm module.

@its-me-VOID
Copy link

@alexander-akait cosmiconfig from version 8.2.0 support ESM config without patch, with the Async APi
https://github.com/cosmiconfig/cosmiconfig#loading-js-modules

@alexander-akait
Copy link
Member Author

@its-me-VOID

postcss.config.mjs silently fail, as if the config wasn't specified.
I think this PR didn't bring support of esm module.

Can you provide reproducible test repo?

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.

postcss-loader dependency does not support ESM
2 participants