-
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
[JIT] Add support for "raw" purge content #4094
Comments
purge
outside tailwind.config.jspurge
Just tried to use an object config right in module.exports = {
mode: 'jit',
// purge: [
// 'src/**/*.*',
// ],
purge: {
enabled: true,
content: [
'src/**/*.*',
],
},
} ... and the same error is thrown. I suppose object syntax just isn't supported yet here, that also being one of the reasons purgecss options like Apologies if this has been covered somewhere, I couldn't find any issue/docs about it except the |
Providing an object with a |
The purge config is in the framework repo - my bad! I just merge whatever you have in tailwind.config.js on top of that. So just adding |
Created a repo that reproduces the issue, I've added instructions in the readme: |
Thanks! It's because you are using "raw" content, which isn't currently supported by JIT mode. We will probably add support for this at some point for consistency with PurgeCSS, but for now that's why it isn't working, sorry about that! |
Ah, OK. Yeah I need Feel free to close the issue if you prefer, and thanks for looking into it! :) |
purge
What version of Tailwind CSS are you using?
v2.1.1
What build tool (or framework if it abstracts the build tool) are you using?
Maizzle v3.3.1
What version of Node.js are you using?
v14.15.1
What browser are you using?
Chrome
What operating system are you using?
Windows 10
Reproduction repository
https://github.com/maizzle/maizzle
Describe your issue
Configuring the
purge
option in your build chain instead oftailwind.config.js
results in:Sounds like it expects it to be in the
tailwind.config.js
file.What I'm doing is definining a base config in the file where I compile Tailwind, like this:
I then merge that with the config read from my
tailwind.config.js
and use it to compile Tailwind with PostCSS:The resulting config is correct, and it works fine without JIT.
When I add
mode: 'jit'
intailwind.config.js
, it throws the error. As soon as I also addpurge: ['src/**/*.*']
intailwind.config.js
, JIT works as expected.The text was updated successfully, but these errors were encountered: