fix docker development environment: Add npm package to Docker image + Add vite server config
This commit is contained in:
parent
55dfb554a4
commit
d668067fee
|
@ -1,6 +1,6 @@
|
||||||
FROM elixir:1.13.4-alpine
|
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
|
RUN mix local.hex --force && mix local.rebar --force
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { defineConfig } from "vite";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { VitePWA } from "vite-plugin-pwa";
|
import { VitePWA } from "vite-plugin-pwa";
|
||||||
import { visualizer } from "rollup-plugin-visualizer";
|
import { visualizer } from "rollup-plugin-visualizer";
|
||||||
import svgLoader from 'vite-svg-loader';
|
import svgLoader from "vite-svg-loader";
|
||||||
|
|
||||||
export default defineConfig(({ command }) => {
|
export default defineConfig(({ command }) => {
|
||||||
const isDev = command !== "build";
|
const isDev = command !== "build";
|
||||||
|
@ -84,6 +84,9 @@ export default defineConfig(({ command }) => {
|
||||||
return {
|
return {
|
||||||
plugins,
|
plugins,
|
||||||
build,
|
build,
|
||||||
|
server: {
|
||||||
|
host: isDev ? "0.0.0.0" : "localhost",
|
||||||
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
"@": path.resolve(__dirname, "./src"),
|
"@": path.resolve(__dirname, "./src"),
|
||||||
|
|
Loading…
Reference in a new issue