* added new card to LiveView page with chart for last 25 hours * fixed formatting of the DatabaseChart * fixed delayed load of google libraries after page refresh * GChart * Delete database.png * removed serial number from screenshot * use vue-google-charts wrapper * fixed wromg position of chart * updated screenshot * updated webapp * added calendar chart * added calendar chart * updated screenshot * used new interface * Fixed problem that charts are not shown after page refresh. * made Vue compile * changed chart options * fixed height * updated webapp * changed chart options * updated webapp * updated Webapp and screenshot * new screenshot * create database when it does not exist * fixed name of days in calendar chart * added debug messages * added more debugging messages * hooked to LiveView instead of MQTT * moved loop handler * fixed time handling * fixed first datapoint * fix hanging of GUI * updated Webapp * some cosmetic changes * updated Webapp * used chunked data transfer * used chunked data transfer * fixed loading flag * removed lambda function * RaBa * fixed chart refresh after reload * fixed wrong time for first database entry on a day * added autorefresh every hour * optimized autorefresh * fixed formatting of card * html change * fixed date comparison * new screenshot * Update README.md
70 lines
1.7 KiB
TypeScript
70 lines
1.7 KiB
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
import viteCompression from 'vite-plugin-compression';
|
|
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js'
|
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
|
|
|
const path = require('path')
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
viteCompression({ deleteOriginFile: true, threshold: 0 }),
|
|
cssInjectedByJsPlugin(),
|
|
VueI18nPlugin({
|
|
/* options */
|
|
include: path.resolve(path.dirname(fileURLToPath(import.meta.url)), './src/locales/**.json'),
|
|
fullInstall: false,
|
|
forceStringify: true,
|
|
strictMessage: false,
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
'~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'),
|
|
}
|
|
},
|
|
build: {
|
|
// Prevent vendor.css being created
|
|
cssCodeSplit: false,
|
|
outDir: '../webapp_dist',
|
|
emptyOutDir: true,
|
|
minify: 'terser',
|
|
rollupOptions: {
|
|
output: {
|
|
// Only create one js file
|
|
inlineDynamicImports: true,
|
|
// Get rid of hash on js file
|
|
entryFileNames: 'js/app.js',
|
|
// Get rid of hash on css file
|
|
assetFileNames: "assets/[name].[ext]",
|
|
},
|
|
},
|
|
},
|
|
esbuild: {
|
|
drop: ['console', 'debugger'],
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'^/api': {
|
|
target: 'http://192.168.2.93/'
|
|
},
|
|
'^/livedata': {
|
|
target: 'ws://192.168.2.93/',
|
|
ws: true,
|
|
changeOrigin: true
|
|
},
|
|
'^/console': {
|
|
target: 'ws://192.168.2.93/',
|
|
ws: true,
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
}
|
|
})
|