How to remove Tailwind from a Phoenix project
There's a chance you have an existing Phoenix project that has been created with the default option of having TailwindCSS integrated, but you would like to go vanilla CSS.
Steps
Remove
:tailwindfrommix.exsRemove related commands from
aliasesinmix.exs(make sure to preserve anyesbuildbuilds if you are using that).Remove
@import "tailwindcss/...fromapp.cssOpen
js/app.jsand addimport "../css/app.css"to it.Delete file
/assets/tailwind.config.jsRemove block starting with
config :tailwindfromconfig.exsRemove
tailwind: {Tailwind, :install_and_run, [:default, ~w(--watch)]}fromwatchersinsidedev.exsRun
mix deps.clean --unlock --unused
Last updated