You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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.
Beta Was this translation helpful? Give feedback.
All reactions