Update postcss-load-config
to 4.x
and address synchronisation issues (*breaking change*)
#596
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.
This is a 🐛 bug fix (?)
Summary
As reported in #591,
postcss-load-config
introduced a breaking change in their latest major version update:4.x
. Instead of loading the configuration in a synchronous way, it's needed to load the configuration in an asynchronous way.The PR;
postcss-load-config > 4.x
again.postcss-load-config
references from3.1.4
to4.0.1
.lit/esbuild-plugins
to also use the asynchronous API.esbuild.defaults.js
.I'm a bit rusty on my JavaScript, so I'm looking for feedback on the proposed
async/await
changes. I'm also not sure how I could add a test case for this and whether or not I should add a test case for this fix.I also wonder whether or not you'd want to support both
3.x
and4.x
versions of thepostcss-load-config
package as I'd need to provide a way to use both versions to get the configuration object.I tested out things locally with the latest version of
postcss-load-config
and was able to build the Bridgetown site again with the new configuration.Context
Fixes #591