Comments (9)
One thing I don't get is, why is postcss
and tailwind
both involved in the build process?
from jet.
In the build
process:
$ npm run tailwind && postcss src/css/styles.css --replace
Isn't Tailwind run twice?
from jet.
Hello Ryan!
Thanks for the kind words.
To (try) to answer your question: I built jet before Tailwind included its new purge
option, so it was setup to purge and minify 'manually'.
A bit later, when Tailwind released its built-in purge
option, I gave it a try. I compared the size of its output CSS to the size of my 'manual' solution's output CSS, and found the new purge
option's output CSS to be larger. Bummer.
I didn't really investigate why, but quickly decided that I would just stick with my original 'manual' process, simply because its output was smaller.
Does that help?
from jet.
Oh I see
from jet.
But
$ npm run tailwind && postcss src/css/styles.css --replace
Tailwind is included in PostCSS, so the Tailwind build process is run on an already built Tailwind file...
const plugins = [
tailwindcss('tailwind.config.js'),
purgecss({
content: ['src/**/*.html']
}),
cssnano()
]
from jet.
Aha, I understand what you mean now βΒ thanks for the clarification! You may be right; I'm going to do some testing as soon as I can, and I'll update this issue.
from jet.
I did some testing and here's what I discovered:
When I adjust the build
script to be the following: "postcss src/css/styles.css --replace && npm run clean && npx @11ty/eleventy"
, the compiled CSS no longer picks up the classes in the HTML.
from jet.
Aha, but if I do the opposite: remove the call to Tailwind from the postcss.config.js file, as seen in 339f02a, it continues to work as desired.
Thank you so much @ryanccn! This has been a great tip.
from jet.
Glad to help!
from jet.
Related Issues (16)
- Improvements / Feature Requests HOT 1
- Build is slow HOT 11
- Recent change to npm scripts produces date issues HOT 1
- Upgrade Eleventy to v2 HOT 1
- 3 Vulnerabilities after installing jet HOT 1
- Improve readme
- Thanks! HOT 1
- Update to Tailwind 2.x HOT 2
- Enable use as a GitHub "template" HOT 1
- Getting an error after installing running npm run dev HOT 3
- bump tw to v 1.5.2 please and thank you :) HOT 1
- Error on npm run dev HOT 5
- autoprefixer? HOT 5
- Consider / apply Dependabot auto-merge Action HOT 5
- Not sure if i'm being stupid - Tailwind issue HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jet.