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

Add support for PostCSS dependency messages #3309

Merged
merged 1 commit into from
May 20, 2021

Conversation

bradlc
Copy link
Contributor

@bradlc bradlc commented May 14, 2021

Changes

This pull request adds support to @snowpack/plugin-postcss for dependency messages created by PostCSS plugins. These messages are used to signify to runners that the PostCSS compilation depends on files or directories other than the input file. The CSS should be rebuilt when these change.

Relevant documentation: https://github.com/postcss/postcss/blob/main/docs/guidelines/runner.md#3-dependencies

Testing

I'm really not sure how to add tests for this. Would appreciate any input on that!

Docs

No docs added as this is not a user-facing change. The messages are created by PostCSS plugins and handled internally by @snowpack/plugin-postcss

@bradlc bradlc requested a review from a team as a code owner May 14, 2021 10:19
@vercel
Copy link

vercel bot commented May 14, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pikapkg/snowpack/H2H7cgMWrKN7k29SV22vJEado5w5
✅ Preview: https://snowpack-git-fork-bradlc-postcss-messages-pikapkg.vercel.app

Copy link
Collaborator

@drwpow drwpow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this! This is a great improvement to the plugin.

Re: tests, behavior like this is notoriously-difficult. As long as you’ve manually tested, this, then that should be enough. Generally-speaking, dev server behavior doesn’t get touched much so this probably won’t regress.

@bradlc
Copy link
Contributor Author

bradlc commented May 20, 2021

Love this! This is a great improvement to the plugin.

Re: tests, behavior like this is notoriously-difficult. As long as you’ve manually tested, this, then that should be enough. Generally-speaking, dev server behavior doesn’t get touched much so this probably won’t regress.

Yep, we are working on a version of Tailwind JIT that uses the new dir-dependency messages and it works great! 🙌

@drwpow drwpow merged commit b5bd57f into FredKSchott:main May 20, 2021
@drwpow
Copy link
Collaborator

drwpow commented May 20, 2021

Merged, and going to release a new minor version with this improvement. Look for it in a few min!

@bradlc
Copy link
Contributor Author

bradlc commented May 24, 2021

Thanks @drwpow!

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.

2 participants