build: assets link error
Dev Deploy / Build Jar (ubuntu-latest) (push) Has been cancelled
Dev Deploy / Build Jar (windows-latest) (push) Has been cancelled
Dev Deploy / Docker Push (push) Has been cancelled
Dev Deploy / Deploy to Maven Central (push) Has been cancelled
Dev Deploy / Deploy to Northflank (push) Has been cancelled

This commit is contained in:
ReaJason
2026-06-28 00:55:04 +08:00
parent e38d48834b
commit b989d5f7d7
3 changed files with 23 additions and 19 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ RUN git clone --depth 1 https://github.com/ReaJason/MemShellParty.git . && \
# https://hub.docker.com/r/oven/bun # https://hub.docker.com/r/oven/bun
FROM --platform=$BUILDPLATFORM oven/bun:1.3.11 AS frontend FROM --platform=$BUILDPLATFORM oven/bun:1.3.11 AS frontend
ARG ROUTE_ROOT_PATH="/" ARG ROUTE_ROOT_PATH=""
ARG CONTEXT_PATH="" ARG CONTEXT_PATH=""
WORKDIR /usr/src/web WORKDIR /usr/src/web
@@ -56,4 +56,4 @@ ENV INTERNAL_JAVA_OPTS="\
EXPOSE 8080 EXPOSE 8080
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS $INTERNAL_JAVA_OPTS -jar app.jar $BOOT_OPTS"] ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS $INTERNAL_JAVA_OPTS -jar app.jar $BOOT_OPTS"]
+1 -1
View File
@@ -1,2 +1,2 @@
VITE_APP_API_URL= VITE_APP_API_URL=
VITE_APP_BASE_PATH=/ui VITE_APP_BASE_PATH=/ui
+20 -16
View File
@@ -2,25 +2,29 @@ import { reactRouter } from "@react-router/dev/vite";
import tailwindcss from "@tailwindcss/vite"; import tailwindcss from "@tailwindcss/vite";
import mdx from "fumadocs-mdx/vite"; import mdx from "fumadocs-mdx/vite";
import path from "node:path"; import path from "node:path";
import { env } from "node:process"; import { defineConfig, loadEnv } from "vite";
import { defineConfig } from "vite";
import devtoolsJson from "vite-plugin-devtools-json"; import devtoolsJson from "vite-plugin-devtools-json";
import * as MdxConfig from "./source.config"; import * as MdxConfig from "./source.config";
const isDev = env.NODE_ENV === "development"; export default defineConfig(({ command, mode }) => {
export default defineConfig({ const env = loadEnv(mode, process.cwd(), "VITE_APP_");
base: isDev ? "/" : `${env.VITE_APP_API_URL}/`, const isDev = command === "serve";
plugins: [mdx(MdxConfig), tailwindcss(), reactRouter(), devtoolsJson()], const contextPath = env.VITE_APP_API_URL?.trim() ?? "";
resolve: {
tsconfigPaths: true, return {
alias: { base: isDev || !contextPath ? "/" : `${contextPath}/`,
"@": path.resolve(__dirname, "./app"), plugins: [mdx(MdxConfig), tailwindcss(), reactRouter(), devtoolsJson()],
...(!isDev resolve: {
? { tsconfigPaths: true,
"react-dom/server": "react-dom/server.node", alias: {
} "@": path.resolve(__dirname, "./app"),
: {}), ...(!isDev
? {
"react-dom/server": "react-dom/server.node",
}
: {}),
},
}, },
}, };
}); });