Closed zorn closed 5 years ago
If you are building with docker then changing the relevant steps in the Dockerfile to this seems to work:
# This step installs all the build tools we'll need
RUN apk update && \
apk upgrade --no-cache && \
apk add --update --no-cache \
nodejs \
nodejs-npm \
git \
build-base && \
mix local.rebar --force && \
mix local.hex --force
# This copies our app source code into the build container
COPY . .
RUN mix do deps.get, deps.compile, compile
# This step builds assets for the Phoenix app (if there is one)
# If you aren't building a Phoenix app, pass `--build-arg SKIP_PHOENIX=true`
# This is mostly here for demonstration purposes
RUN if [ ! "$SKIP_PHOENIX" = "true" ]; then \
cd ${PHOENIX_SUBDIR}/assets && \
npm install && \
node node_modules/webpack/bin/webpack.js --mode production && \
cd .. && \
mix phx.digest; \
fi
Description of issue
https://hexdocs.pm/distillery/guides/phoenix_walkthrough.html
Documentation has commands that include
brunch
whenwebpack.js
is what is used by a fresh elixir phoenix app (as of v1.4.1).