chore: simplify esbuild config, fix hot reload
This commit is contained in:
parent
80743a50f7
commit
cc57bddc24
2 changed files with 2 additions and 8 deletions
|
@ -38,12 +38,7 @@ config :esbuild,
|
||||||
version: "0.17.11",
|
version: "0.17.11",
|
||||||
comfycamp: [
|
comfycamp: [
|
||||||
args:
|
args:
|
||||||
~w(js/app.js --bundle --target=es2017 --outdir=../priv/static/assets --external:/fonts/* --external:/images/*),
|
~w(js/app.js css/home.css css/admin.css --bundle --target=es2017 --outdir=../priv/static/assets --external:/fonts/* --external:/images/*),
|
||||||
cd: Path.expand("../assets", __DIR__),
|
|
||||||
env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
|
|
||||||
],
|
|
||||||
css: [
|
|
||||||
args: ~w(css/home.css css/admin.css --outdir=../priv/static/assets),
|
|
||||||
cd: Path.expand("../assets", __DIR__),
|
cd: Path.expand("../assets", __DIR__),
|
||||||
env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
|
env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
|
||||||
]
|
]
|
||||||
|
|
3
mix.exs
3
mix.exs
|
@ -70,10 +70,9 @@ defmodule Comfycamp.MixProject do
|
||||||
"ecto.reset": ["ecto.drop", "ecto.setup"],
|
"ecto.reset": ["ecto.drop", "ecto.setup"],
|
||||||
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
|
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
|
||||||
"assets.setup": ["esbuild.install --if-missing"],
|
"assets.setup": ["esbuild.install --if-missing"],
|
||||||
"assets.build": ["esbuild comfycamp", "esbuild css"],
|
"assets.build": ["esbuild comfycamp"],
|
||||||
"assets.deploy": [
|
"assets.deploy": [
|
||||||
"esbuild comfycamp --minify",
|
"esbuild comfycamp --minify",
|
||||||
"esbuild css --minify",
|
|
||||||
"phx.digest"
|
"phx.digest"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue