tnt
December 26, 2019, 7:06pm
1
Hello,
when I generate a new project with mix phx.new ...
at least some of the templates used are quite outdated. For example the ./config/dev.exs contains a bug that had been fixed in August:
config :demo, DemoWeb.Endpoint,
live_reload: [
patterns: [
~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
~r"priv/gettext/.*(po)$",
~r"lib/demo_web/{live,views}/.*(ex)$",
~r"lib/demo_web/templates/.*(eex)$"
]
]
The line ~r"lib/demo_web/{live,views}/.*(ex)$",
is the outdated one (line 54 here ).
ls ~/.mix/archives
shows two directories: hex-0.20.1
and phx_new-1.4.11
; the latter is the one in use as I understand it.
./mix.exs
contains for example the correct Phoenix version {:phoenix, "~> 1.4.11"}
so the template is partially correct/up to date.
Anyone any idea what’s going wrong?
Thanks in advance
NobbZ
December 26, 2019, 7:33pm
2
Looking at the tag 1.4.11 rather than the 1.4 branch, the template looks exactly like the code you show here:
use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
config :<%= app_name %>, <%= endpoint_module %>,
http: [port: 4000],
debug_errors: true,
code_reloader: true,
check_origin: false,
watchers: <%= if webpack do %>[
node: [
"node_modules/webpack/bin/webpack.js",
"--mode",
"development",
"--watch-stdin",
cd: Path.expand("../assets", __DIR__)
This file has been truncated. show original
tnt
December 26, 2019, 7:39pm
3
That explains it of course. Thank you. Somehow I thought 1.4.11 was of November - no idea how this came to my mind. - So everything is working as one should expect!
NobbZ
December 26, 2019, 7:43pm
4
It is, but it seems to not contain that patch for some reason.
tnt
December 26, 2019, 7:51pm
5
I don’t get it. - I have to get some sleep.