Repository navigation
Replies: 1 comment
|
At the moment, you can't build the Tailwind CSS CLI entirely from source. The build process depends on packages like While you can force some dependencies to compile from source if they support it, Tailwind itself doesn't currently provide an officially supported, fully source-only build process. This also makes packaging for Linux distributions and unsupported architectures (such as RISC-V) more difficult. If full source compilation is important for your use case, it's worth opening or supporting a feature request for an officially supported source-only build path. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
How can I build the tailwindcss command line tool from source?
It seems that tailwind is built using pnpm, the problem is that during the build process pre-built binaries are downloaded for some dependencies, for example oxide and parcel/watcher, so this isn't truly building from source.
There are several reasons building software from source instead of downloading pre-built binaries is desirable: first, it is required for it to be packaged in most linux distributions for installation with the system package manager. Second, it is vital, in my opinion, for security reasons. Downloading binaries from the internet even if they are ostensibly from a trusted source is a security concern, in the case of a pnpm build there are multiple binaries (packaged within the tailwindcss tool) from many different sources across npm being installed on the users computer which definitely gives an uneasy feeling and would certainly not be allowed in a high security setting. Thirdly it allows a packager to make the tool available to more platforms and architectures, tailwindcss for example can't be installed on a riscv computer or an older Mac, but if you could build it from source it would be possible. (For example this users problem could have been addressed.)
As a side note: thank you for making a musl build of tailwindcss available, it is highly appreciated.
Achieving true source compilation could be easier now that the javascript config file has been replaced by a CSS config file, perhaps this means a JS engine is not needed at runtime, not sure if it's possible yet to build tailwindcss without bun.
Please excuse any mistakes I made, I am unfamiliar with pnpm and npm in general.
I would be grateful for any tips in how to achieve this or if there are plans to do so already.
All reactions