experimental shadow package from ui components

This commit is contained in:
ArneBo 2024-10-24 12:57:12 +02:00 committed by upsiflu
parent 658946c15d
commit fd2ecd4c45
4 changed files with 21 additions and 5 deletions

View File

@ -47,16 +47,20 @@ services:
dockerfile: Dockerfile.dev dockerfile: Dockerfile.dev
ports: ports:
- "${VUE_PORT:-8080}:${VUE_PORT:-8080}" - "${VUE_PORT:-8080}:${VUE_PORT:-8080}"
- "24678:24678" # Vite HMR (Hot Module Replacement) port
environment: environment:
- HOST - HOST
- VUE_PORT - VUE_PORT
- VITE_HMR_HOST=localhost
- VITE_HMR_PORT=24678
volumes: volumes:
- "./ui:/app/ui"
- "./front:/app" - "./front:/app"
- "/app/node_modules" - "/app/node_modules"
- "./po:/po" - "./po:/po"
networks: networks:
- internal - internal
command: "yarn dev --host" command: sh -c "ls -la && yarn dev --host"
api: api:
extends: extends:

View File

@ -5,10 +5,16 @@ RUN apk add --no-cache jq bash coreutils python3
EXPOSE 8080 EXPOSE 8080
WORKDIR /app/ WORKDIR /app/
# Create node_modules directory to prevent it from being hidden by volume mounts
RUN mkdir -p node_modules
# Copy UI package for initial installation
COPY ui ./ui/
# Copy entry script
COPY scripts/ ./scripts/ COPY scripts/ ./scripts/
ADD package.json yarn.lock ./ ADD package.json yarn.lock ./
RUN yarn install RUN yarn install
COPY . .
CMD ["yarn", "serve"] CMD ["yarn", "serve"]

View File

@ -18,7 +18,6 @@
"postinstall": "yarn run fix-fomantic-css" "postinstall": "yarn run fix-fomantic-css"
}, },
"dependencies": { "dependencies": {
"@funkwhale/ui": "0.3.0",
"@sentry/tracing": "7.47.0", "@sentry/tracing": "7.47.0",
"@sentry/vue": "7.47.0", "@sentry/vue": "7.47.0",
"@tauri-apps/api": "2.0.0-beta.1", "@tauri-apps/api": "2.0.0-beta.1",
@ -66,6 +65,7 @@
"vuex-router-sync": "5.0.0" "vuex-router-sync": "5.0.0"
}, },
"devDependencies": { "devDependencies": {
"ui": "file:/app/ui",
"@faker-js/faker": "8.4.1", "@faker-js/faker": "8.4.1",
"@iconify/vue": "4.1.1", "@iconify/vue": "4.1.1",
"@intlify/eslint-plugin-vue-i18n": "2.0.0", "@intlify/eslint-plugin-vue-i18n": "2.0.0",

View File

@ -58,7 +58,13 @@ export default defineConfig(({ mode }) => ({
vueDevTools(), vueDevTools(),
], ],
server: { server: {
port host: '0.0.0.0',
port: 8080,
hmr: {
host: 'localhost',
port: 24678,
protocol: 'ws'
},
}, },
resolve: { resolve: {
alias: [ alias: [