Commit f73a80d73365ee0a45382017f5f3f51ae00aa801

Thomas de Grivel 2022-04-05T16:17:49

sass and esbuild config for dev only

diff --git a/config/config.exs b/config/config.exs
index 13d6cda..617444d 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -21,14 +21,6 @@ config :kmxgit, KmxgitWeb.Endpoint,
   pubsub_server: Kmxgit.PubSub,
   live_view: [signing_salt: "0HhihW2z"]
 
-config :dart_sass,
-  path: "sass",
-  version: "1.39.0",
-  default: [
-    args: ~w(css/app.scss ../priv/static/_assets/app.css),
-    cd: Path.expand("../assets", __DIR__)
-  ]
-
 # Configures the mailer
 #
 # By default it uses the "Local" adapter which stores the emails
@@ -41,17 +33,6 @@ config :kmxgit, Kmxgit.Mailer, adapter: Swoosh.Adapters.Local
 # Swoosh API client is needed for adapters other than SMTP.
 config :swoosh, :api_client, false
 
-# Configure esbuild (the version is required)
-config :esbuild,
-  path: "esbuild",
-  version: "0.12.18",
-  default: [
-    args:
-      ~w(js/app.js --bundle --target=es2016 --outdir=../priv/static/_assets --external:/fonts/* --external:/images/*),
-    cd: Path.expand("../assets", __DIR__),
-    env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
-  ]
-
 # Configures Elixir's Logger
 config :logger, :console,
   format: "$time $metadata[$level] $message\n",
diff --git a/config/dev.exs b/config/dev.exs
index 4bd5eb1..49fc102 100644
--- a/config/dev.exs
+++ b/config/dev.exs
@@ -28,6 +28,24 @@ config :kmxgit, KmxgitWeb.Endpoint,
     esbuild: {Esbuild, :run, [:default, ~w(--sourcemap=inline --watch)]}
   ]
 
+config :dart_sass,
+  path: "sass",
+  version: "1.49.10",
+  default: [
+    args: ~w(css/app.scss ../priv/static/_assets/app.css),
+    cd: Path.expand("../assets", __DIR__)
+  ]
+
+config :esbuild,
+  path: "esbuild",
+  version: "0.14.27",
+  default: [
+    args:
+      ~w(js/app.js --bundle --target=es2016 --outdir=../priv/static/_assets --external:/fonts/* --external:/images/*),
+    cd: Path.expand("../assets", __DIR__),
+    env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
+  ]
+
 # ## SSL Support
 #
 # In order to use HTTPS in development, a self-signed