* fix: improve application properties and enable more logs * chore: fix application properties * test: fix test cases * ci: fix sonarloud project key for the backend * chore: add variable to manage root logging level * chore: debug log mode * feat: fix healthcheck for tasknote api * feat: fix dockerfile for client - finally Issue #308 * chore: bump some versions closes #311 closes #312 closes #313 closes #314 closes #315 closes #317 closes #318 * test: add backend test case chore: fix note type error on frontend * test: add test case
56 lines
1.1 KiB
TypeScript
56 lines
1.1 KiB
TypeScript
import { ConfigEnv, defineConfig, UserConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import { fileURLToPath } from 'url';
|
|
import path from 'path';
|
|
|
|
export default defineConfig(({ mode }: ConfigEnv) => {
|
|
const config: UserConfig = {
|
|
define: {},
|
|
plugins: [
|
|
{
|
|
name: 'build-html',
|
|
apply: 'build',
|
|
transformIndexHtml: (html) => {
|
|
return {
|
|
html,
|
|
tags: [
|
|
{
|
|
tag: 'script',
|
|
attrs: {
|
|
src: '/env.js'
|
|
},
|
|
injectTo: 'head'
|
|
}
|
|
]
|
|
};
|
|
}
|
|
},
|
|
react()
|
|
],
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: true
|
|
},
|
|
server: {
|
|
port: 5000
|
|
},
|
|
preview: {
|
|
port: 5000
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
'~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap')
|
|
}
|
|
}
|
|
};
|
|
|
|
if (mode === 'development') {
|
|
if (config.define) {
|
|
config.define.global = {};
|
|
}
|
|
}
|
|
|
|
return config;
|
|
});
|