feat:support tailwindcss v4#3054
Conversation
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
iuioiua
left a comment
There was a problem hiding this comment.
Instances of tailwind() not being awaited still remain in the codebase. E.g. https://github.com/SisyphusZheng/fresh/blob/aac6207306cfcda2405e2761958136fb637cf470/docs/canary/examples/migration-guide.md?plain=1#L62. I suggest searching for "tailwind(".
thx for pointing out this issue. This is actually part of the documentation and does not affect the code. I hope the documentation can be revised later. Of course, I will also double-check if there is any code that hasn't been actually fixed. |
|
But it matters that the documentation is correct according to the implementation. Otherwise, users will be mislead on how to use |
I understand the importance of this issue now and will make the modification. Thank you. |
| { | ||
| "tasks": { | ||
| "start": "deno run -A --watch=static/,routes/,../src,../docs dev.ts", | ||
| "start": "deno run -A --allow-scripts --watch=static/,routes/,../src,../docs dev.ts", |
There was a problem hiding this comment.
Is --allow-scripts required now? Genuine question. I haven't checked. If so, we should consider whether other tasks such as build need it too, including those created from the init script.
There was a problem hiding this comment.
The oxide script requires --allow-script during deno install, and I can't figure out a way to avoid this warning for the time being.
Relocates the addition of 'postcss' and '@tailwindcss/postcss' imports to the block where Tailwind-related imports are set, ensuring they are only included when Tailwind is used.
Refactored the tailwind plugin to be synchronous instead of async, updating its function signature and all usage examples and documentation accordingly. This simplifies integration and removes unnecessary awaits from code and docs.
…nto patch-test
|
Are you able to resolve the merge conflicts? @marvinhagemeister, are you able to take a look? It seems a lot of people would love to have this added. |
|
Resolved the merge conflicts, but it looks like the PR is not yet ready to be merged. Several aspects of the site in main:
This PR:
|
marvinhagemeister
left a comment
There was a problem hiding this comment.
LGTM, Thanks for updating the plugin! I've went ahead and updated the code in www for v4 too.


update /www and tailwind-plugin to support tailwind v4.
Thanks to the merge of #3034, the work of integrating and advancing #2903 is promoted.
related #3034
related #2903
close #3056
close #2819
--patch-1
based on review,
--patch-2
--patch-3
--patch-4
Move postcss imports to Tailwind section in init script
--patch-5
Refactored Tailwind plugin type definitions by copying PluginOptions properties from @tailwindcss/postcss and adding Fresh-specific exclude option, while exporting types from package entrypoint for better accessibility.
Test Project: https://fresh.fresh-press.deno.net/
Test Project Repository: https://github.com/SisyphusZheng/fresh-tailwindv4
Test Plugin: https://jsr.io/@freshpress/fresh-plugin-tailwind@1.0.0