How to remove Tailwind from a Phoenix project
Last updated
Last updated
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.
Remove :tailwind
from mix.exs
Remove related commands from aliases
in mix.exs
(make sure to preserve any esbuild
builds if you are using that).
Remove @import "tailwindcss/...
from app.css
Open js/app.js
and add import "../css/app.css"
to it.
Delete file /assets/tailwind.config.js
Remove block starting with config :tailwind
from config.exs
Remove tailwind: {Tailwind, :install_and_run, [:default, ~w(--watch)]}
from watchers
inside dev.exs
Run mix deps.clean --unlock --unused