fix docker development environment: Add npm package to Docker image + Add vite server config

This commit is contained in:
summersamara 2023-11-22 20:14:08 +01:00
parent 55dfb554a4
commit d668067fee
2 changed files with 5 additions and 2 deletions

View file

@ -1,6 +1,6 @@
FROM elixir:1.13.4-alpine
RUN apk add --no-cache inotify-tools postgresql-client file make gcc libc-dev argon2 imagemagick cmake build-base libwebp-tools bash ncurses git python3
RUN apk add --no-cache inotify-tools postgresql-client file make gcc libc-dev argon2 imagemagick cmake build-base libwebp-tools bash ncurses git python3 npm
RUN mix local.hex --force && mix local.rebar --force

View file

@ -3,7 +3,7 @@ import { defineConfig } from "vite";
import path from "path";
import { VitePWA } from "vite-plugin-pwa";
import { visualizer } from "rollup-plugin-visualizer";
import svgLoader from 'vite-svg-loader';
import svgLoader from "vite-svg-loader";
export default defineConfig(({ command }) => {
const isDev = command !== "build";
@ -84,6 +84,9 @@ export default defineConfig(({ command }) => {
return {
plugins,
build,
server: {
host: isDev ? "0.0.0.0" : "localhost",
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),