-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
postcss-import
module breaks content
& safelist
when using TailwindCLI
#8153
Comments
Hey! Do you mind providing an actual reproduction repository we can clone that demonstrates the issue? Trying to create a reproduction ourselves from the information in an issue drastically increases the amount of time it takes for us to provide a solution and if we have do that for every issue it’s impossible for us to keep up. |
Hey @adamwathan You're right, i even realised i forgot some parts, here you go :) (I added a readme with steps) |
I did more tests & it seems not only related to standalone, CLI has the same issue running |
After further testings, i found that |
postcss-import
module breaks content
& safelist
postcss-import
module breaks content
& safelist
postcss-import
module breaks content
& safelist
when using TailwindCLI
Hey @damien-pilot-in. In your specific case, since you only have one CSS file one option would be to replace the - @import "tailwindcss/base";
+ @tailwind base;
...
- @import "tailwindcss/components";
+ @tailwind components;
...
- @import "tailwindcss/utilities";
+ @tailwind utilities; I hope that helps! |
What version of Tailwind CSS are you using?
Tested from 3.0.0 to 3.0.24
What build tool (or framework if it abstracts the build tool) are you using?
TailwindCSS CLI from 3.0.0 to 3.0.24
What version of Node.js are you using?
v12.13.0
What browser are you using?
Chrome
What operating system are you using?
Linux (server & compilation side)
Reproduction repository:
Assets URL (pastebin urls)
safelist.txt
(used your regex to extract classes from my website code)tailwind.config.js
tailwind.css
postcss.config.js
Command i use to compile from build_1 folder (see below folder structure):
/path/from/root/tailwind-v3/tailwindcss -i tailwind.css -o tailwind.min.css --postcss
My folder structure is like so:
Describe your issue
My
safelist.txt
is used in'content': ['./safelist.txt'],
in mytailwind.config.js
Also tried to add all words present in my
safelist.txt
directly intosafelist
as your doc says in mytailwind.config.js
but it never generates my classes.For example, the
.flex
class is not present in my final generatedtailwind.min.css
file.Output i get from CLI is:
Done in 2328ms.
It does generate a
tailwind.min.css
but only with the content in mytailwind.css
file.So it seems to find & use my
safelist.txt
incontent
since i have no "Warn, no content defined" message but doesn't generate classes.The text was updated successfully, but these errors were encountered: