-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Use import
to load plugins
#14132
Merged
Merged
Use import
to load plugins
#14132
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
philipp-spiess
requested review from
thecrypticace,
RobinMalfait and
adamwathan
August 6, 2024 10:24
adamwathan
approved these changes
Aug 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your sacrifice 😄 Looks good!
philipp-spiess
force-pushed
the
fix/plugin-dynamic-require
branch
5 times, most recently
from
August 8, 2024 10:12
ad68313
to
6db1ab2
Compare
philipp-spiess
force-pushed
the
fix/plugin-dynamic-require
branch
13 times, most recently
from
August 8, 2024 13:53
e4aa5ee
to
b122b9e
Compare
philipp-spiess
force-pushed
the
fix/plugin-dynamic-require
branch
from
August 8, 2024 14:17
b122b9e
to
a930cf4
Compare
Windows CI stalls on this quite often with no feedback as to what is wrong
thecrypticace
approved these changes
Aug 8, 2024
RobinMalfait
reviewed
Aug 8, 2024
philipp-spiess
added a commit
that referenced
this pull request
Aug 26, 2024
Closes #14253 Since we changed the export strategy for the postcss client in #14132, we accidentally no longer generated type exports for this package. This PR adds a type export back. We now use a similar pattern to the `./colors` and `./defaultTheme` exports in the tailwindcss package where we have a separate cjs entrypoint. The changes were validated manually in a playground project that were installing the updated dependencies from tarballs. Here is one example of it working as expected: <img width="750" alt="Screenshot 2024-08-26 at 14 10 07" src="https://github.com/user-attachments/assets/83de15f2-1543-4805-9231-9b8df1636c5e">
philipp-spiess
added a commit
that referenced
this pull request
Aug 27, 2024
Closes #14253 Since we changed the export strategy for the postcss client in #14132, we accidentally no longer generated type exports for this package. This PR adds a type export back. We now use a similar pattern to the `./colors` and `./defaultTheme` exports in the tailwindcss package where we have a separate cjs entrypoint. The changes were validated manually in a playground project that were installing the updated dependencies from tarballs. Here is one example of it working as expected: <img width="750" alt="Screenshot 2024-08-26 at 14 10 07" src="https://github.com/user-attachments/assets/83de15f2-1543-4805-9231-9b8df1636c5e">
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Alternative to #14110
This PR changes the way how we load plugins to be compatible with ES6 async
import
s. This allows us to load plugins even inside the browser but it comes at a downside: We now have to change thecompile
API to return aPromise
...So most of this PR is rewriting all of the call sites of
compile
to expect a promise instead of the object.