pridany efekt stmavnutia ostatnych a zosvetelenie presuvaneho reportu v dashboard,
pridana podmienka pre MODE zostavenia ci je to DEV alebo BUILD a podla toho nastavenia URL,
This commit is contained in:
@ -1,21 +1,26 @@
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
// import pkg from "./package.json";
|
||||
import { createRequire } from 'node:module'
|
||||
import { createRequire } from "node:module";
|
||||
|
||||
const require = createRequire(import.meta.url)
|
||||
const pkg = require('./package.json')
|
||||
const require = createRequire(import.meta.url);
|
||||
const pkg = require("./package.json");
|
||||
|
||||
const subpath = "/bugreport/";
|
||||
export const baseUrl = subpath + "webapp/dist/";
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
base: baseUrl,
|
||||
plugins: [vue()],
|
||||
define: {
|
||||
__APP_VERSION__: JSON.stringify(pkg.version),
|
||||
__BUILD_DATE__: JSON.stringify(new Date().toISOString()),
|
||||
__SUBPATH__: JSON.stringify(subpath),
|
||||
},
|
||||
export default defineConfig(({ command, mode }) => {
|
||||
const isBuild = command === "build";
|
||||
const isDev = command === "serve";
|
||||
|
||||
return {
|
||||
base: isBuild ? baseUrl : "/",
|
||||
plugins: [vue()],
|
||||
define: {
|
||||
__APP_VERSION__: JSON.stringify(pkg.version),
|
||||
__BUILD_DATE__: JSON.stringify(new Date().toISOString()),
|
||||
__SUBPATH__: JSON.stringify(isBuild ? subpath : "/"),
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user