mirror of
https://github.com/stashapp/stash.git
synced 2026-05-09 05:05:29 +02:00
* minor package version bumps, remove string.replaceAll polyfill * update universal-cookie * bump flag-icons * [apollo] replace cloneDeep with lodash-es/CloneDeep * [apollo] partial upgrade to 3.14 * remove dom-screen-wake-lock * switch videojs-vr library for xvr support. minor bumps * vite 7 * bump ua-parser-js * bump postcss * bump polyfills * partial bump eslint to v8, otherwise we lose airbnb * bump typescript to 5.9 * ensure node engine, remove homepage
43 lines
899 B
JavaScript
43 lines
899 B
JavaScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
import viteCompression from "vite-plugin-compression";
|
|
|
|
const sourcemap = process.env.VITE_APP_SOURCEMAPS === "true";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(() => {
|
|
let plugins = [
|
|
react({
|
|
babel: {
|
|
compact: true,
|
|
},
|
|
}),
|
|
tsconfigPaths(),
|
|
viteCompression({
|
|
algorithm: "gzip",
|
|
deleteOriginFile: true,
|
|
threshold: 0,
|
|
filter: /\.(js|json|css|svg|md)$/i,
|
|
}),
|
|
];
|
|
|
|
return {
|
|
base: "",
|
|
build: {
|
|
outDir: "build",
|
|
sourcemap: sourcemap,
|
|
reportCompressedSize: false,
|
|
},
|
|
optimizeDeps: {
|
|
entries: "src/index.tsx",
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
cors: false,
|
|
},
|
|
publicDir: "public",
|
|
assetsInclude: ["**/*.md"],
|
|
plugins,
|
|
};
|
|
});
|