Closed yassinrais closed 1 year ago
Okay, so as far i understand, I found a way to do this by having two watchers
1/2. config.exs
config :tailwind,
version: "3.1.6",
app: [
args: ~w(
--config=tailwind.config.js
--input=css/app.css
--output=../priv/static/assets/app.css
),
cd: Path.expand("../assets", __DIR__)
],
form: [
args: ~w(
--config=tailwind.config.js
--input=css/form.css
--output=../priv/static/assets/form.css
),
cd: Path.expand("../assets", __DIR__)
]
2/2. dev.ex
config :newnix, NewnixWeb.Endpoint,
#....
watchers: [
# Start the esbuild watcher by calling Esbuild.install_and_run(:default, args)
esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]},
tailwind: {Tailwind, :install_and_run, [:app, ~w(--watch)]},
tailwind_form: {Tailwind, :install_and_run, [:form, ~w(--watch)]}
]```
Two watchers would be the way to go. Thanks!
Is it possible to build several css files?
Example
to