fix(deploy): build ops web with shared tsconfig
This commit is contained in:
@@ -8,6 +8,7 @@ RUN npm install -g pnpm@10.33.0
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||
COPY packages/tsconfig/base.json ./packages/tsconfig/base.json
|
||||
COPY apps/ops-web/package.json ./apps/ops-web/
|
||||
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
@@ -24,4 +24,9 @@ server {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
gzip on;
|
||||
gzip_static on;
|
||||
gzip_vary on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"@vitejs/plugin-vue": "^6.0.5",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^7.3.2",
|
||||
"vite-plugin-compression2": "^2.5.3",
|
||||
"vue-tsc": "^3.2.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
import { fileURLToPath, URL } from "node:url";
|
||||
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { defineConfig, loadEnv } from "vite";
|
||||
import { defineConfig, loadEnv, type PluginOption } from "vite";
|
||||
import { compression } from "vite-plugin-compression2";
|
||||
|
||||
const r = (path: string) => fileURLToPath(new URL(path, import.meta.url));
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, ".", "");
|
||||
const isProd = mode === "production";
|
||||
const plugins: PluginOption[] = [vue()];
|
||||
|
||||
if (isProd) {
|
||||
plugins.push(
|
||||
compression({
|
||||
algorithms: ["gzip", "brotliCompress"],
|
||||
threshold: 1024,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
plugins: [vue()],
|
||||
plugins,
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": r("./src"),
|
||||
|
||||
Generated
+3
@@ -254,6 +254,9 @@ importers:
|
||||
vite:
|
||||
specifier: ^7.3.2
|
||||
version: 7.3.2(@types/node@24.12.0)(jiti@2.6.1)(lightningcss@1.32.0)
|
||||
vite-plugin-compression2:
|
||||
specifier: ^2.5.3
|
||||
version: 2.5.3(rollup@4.60.2)
|
||||
vue-tsc:
|
||||
specifier: ^3.2.6
|
||||
version: 3.2.6(typescript@5.9.3)
|
||||
|
||||
Reference in New Issue
Block a user