Browse Source

Using node watchers instead of static cache for resources

master
Pursuit 2 years ago
parent
commit
9c25d9a36e
  1. 4
      build.sh
  2. 11
      config/prod.exs

4
build.sh

@ -11,10 +11,6 @@ mix deps.get
cd assets
npm install
cd ..
cp -r assets/static priv
cp -r assets/js priv/static
cp -r assets/css priv/static
mix phx.digest
# Migrate DB
mix ecto.setup

11
config/prod.exs

@ -11,7 +11,16 @@ use Mix.Config
# before starting your production server.
config :iqrcode, IqrcodeWeb.Endpoint,
url: [host: System.get_env("WEBSITE_HOST"), port: 80],
cache_static_manifest: "priv/static/cache_manifest.json"
#cache_static_manifest: "priv/static/cache_manifest.json"
watchers: [
node: [
"node_modules/webpack/bin/webpack.js",
"--mode",
"development",
"--watch-stdin",
cd: Path.expand("../assets", __DIR__)
]
]
# Do not print debug messages in production
config :logger, level: :info

Loading…
Cancel
Save