Closed kylesloper closed 3 years ago
Is the CSS file exist? If not, maybe you added CSS file to .gitignore
I've downloaded the deploy from Netlify and it seems that the entire css
directory is missing. Is there a common reason for this?
Can I see your package.json
content?
{ "name": "redacted", "title": "redacted", "version": "1.0.3", "description": "redacted", "scripts": { "build": "npx eleventy", "watch": "npx eleventy --watch", "debug": "DEBUG=* npx eleventy" }, "repository": { "type": "git", "url": "redacted" }, "author": { "name": "redacted", "email": "redacted", "url": "redacted" }, "license": "MIT", "bugs": { "url": "redacted" }, "devDependencies": {}, "dependencies": { "@11ty/eleventy": "^0.11.1", "@11ty/eleventy-navigation": "^0.1.6", "clean-css": "^4.2.1", "eleventy-plugin-tailwindcss": "^0.3.0", "html-minifier": "^4.0.0", "luxon": "^1.26.0", "markdown-it": "^10.0.0", "markdown-it-anchor": "^5.3.0", "netlify-cli": "^3.16.2", "uglify-es": "^3.3.9" } }
Hmmm, maybe do you have any public repository with the same issue that I can take a look at? Because I can't reproduce.
This is the repo with that issue, I've given you access.
Wait, are you sure styles look normal on local env? The CSS messed up when I try to run netlify dev
Yeah styles are completely fine on local. I did reset the repo to before I was messing around trying to fix the issue shortly after I added you, is it possible you've cloned the old one?
But this https://i.ibb.co/nLLggVJ/1618142123061.png doesn't look fine, the correct branch is "v1" right?
Yeah that's the correct branch. That's strange styles are looking okay in my local build.
Well, that's weird. Give me a screenshot of the view-source please, maybe something's different.
Not too sure how to screenshot it, it's a very long file. Do you want me to copy paste instead?
I mean just the \<head> part, but okay copy paste is fine, but don't paste here, use Pastebin then send the link here
Do you disable Tailwind "jit" mode locally?
No I did not.
I have disabled that and pushed. Netlify deploy still showing no styles coming from tw.css
Send the Netlify deploy log here using Pastebin, I will take a look
I see, so Netlify is using Node v10.24.1, but there's a code using flatMap
which is only available in Node > v11.0.0. Add .nvmrc
to your repo with the contents of v12
and it should work fine. Read more.
Unfortunately no fix yet, this time the tw.css
file is processed but only contains this.
https://pastebin.com/D2s33krR
It's weird because it has partially generated my styles from tw.css
I see you're enabling back the "jit" mode in the latest commit, if you wanna do that, you need to set the purge
property with the template files path.
For example:
module.exports = {
purge: [
'./**/*.njk'
],
darkMode: false, // or 'media' or 'class'
mode: 'jit',
...
See https://tailwindcss.com/docs/just-in-time-mode#enabling-jit-mode
Thank you so much for your time, it's working perfectly now. Great plugin btw ❤
Good to hear that. Can I close this issue?
Of course :))
Styles look normal on
Netlify dev
(locally) however after deploy there is no styling. My build command isnpm run build
.. is this the correct config for this plugin?