Skip to content

Commit cb6afdf

Browse files
CopilotAndreasBoehm
andcommitted
Revert unnecessary changes to webapp configuration files
Co-authored-by: AndreasBoehm <1270749+AndreasBoehm@users.noreply.github.com>
1 parent ace8aa6 commit cb6afdf

File tree

4 files changed

+3606
-3499
lines changed

4 files changed

+3606
-3499
lines changed

webapp/package.json

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
{
2-
"name": "opendtu",
3-
"version": "0.1.0",
4-
"private": true,
5-
"type": "module",
6-
"scripts": {
7-
"dev": "vite",
8-
"build": "run-p type-check build-only",
9-
"preview": "vite preview --port 4173",
10-
"build-only": "vite build",
11-
"type-check": "vue-tsc --noEmit",
12-
"lint": "eslint .",
13-
"format": "prettier --write src/"
14-
},
15-
"dependencies": {
16-
"@popperjs/core": "^2.11.8",
17-
"bootstrap": "^5.3.6",
18-
"bootstrap-icons-vue": "^1.11.3",
19-
"mitt": "^3.0.1",
20-
"sortablejs": "^1.15.6",
21-
"spark-md5": "^3.0.2",
22-
"vue": "^3.5.13",
23-
"vue-i18n": "11.1.3",
24-
"vue-router": "^4.5.1"
25-
},
26-
"devDependencies": {
27-
"@intlify/unplugin-vue-i18n": "^6.0.8",
28-
"@tsconfig/node22": "^22.0.1",
29-
"@types/bootstrap": "^5.2.10",
30-
"@types/node": "^22.15.17",
31-
"@types/pulltorefreshjs": "^0.1.7",
32-
"@types/sortablejs": "^1.15.8",
33-
"@types/spark-md5": "^3.0.5",
34-
"@vitejs/plugin-vue": "^5.2.4",
35-
"@vue/eslint-config-typescript": "^14.5.0",
36-
"@vue/tsconfig": "^0.7.0",
37-
"eslint": "^9.26.0",
38-
"eslint-plugin-vue": "^10.1.0",
39-
"npm-run-all": "^4.1.5",
40-
"prettier": "^3.5.3",
41-
"pulltorefreshjs": "^0.1.22",
42-
"sass": "=1.78.0",
43-
"terser": "^5.39.0",
44-
"typescript": "^5.8.3",
45-
"vite": "^6.3.5",
46-
"vite-plugin-compression": "^0.5.1",
47-
"vite-plugin-css-injected-by-js": "^3.5.2",
48-
"vue-tsc": "^2.2.10"
49-
},
50-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
2+
"name": "opendtu",
3+
"version": "0.1.0",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "run-p type-check build-only",
9+
"preview": "vite preview --port 4173",
10+
"build-only": "vite build",
11+
"type-check": "vue-tsc --noEmit",
12+
"lint": "eslint .",
13+
"format": "prettier --write src/"
14+
},
15+
"dependencies": {
16+
"@popperjs/core": "^2.11.8",
17+
"bootstrap": "^5.3.6",
18+
"bootstrap-icons-vue": "^1.11.3",
19+
"mitt": "^3.0.1",
20+
"sortablejs": "^1.15.6",
21+
"spark-md5": "^3.0.2",
22+
"vue": "^3.5.13",
23+
"vue-i18n": "11.1.3",
24+
"vue-router": "^4.5.1"
25+
},
26+
"devDependencies": {
27+
"@intlify/unplugin-vue-i18n": "^6.0.8",
28+
"@tsconfig/node22": "^22.0.1",
29+
"@types/bootstrap": "^5.2.10",
30+
"@types/node": "^22.15.17",
31+
"@types/pulltorefreshjs": "^0.1.7",
32+
"@types/sortablejs": "^1.15.8",
33+
"@types/spark-md5": "^3.0.5",
34+
"@vitejs/plugin-vue": "^5.2.4",
35+
"@vue/eslint-config-typescript": "^14.5.0",
36+
"@vue/tsconfig": "^0.7.0",
37+
"eslint": "^9.26.0",
38+
"eslint-plugin-vue": "^10.1.0",
39+
"npm-run-all": "^4.1.5",
40+
"prettier": "^3.5.3",
41+
"pulltorefreshjs": "^0.1.22",
42+
"sass": "=1.78.0",
43+
"terser": "^5.39.0",
44+
"typescript": "^5.8.3",
45+
"vite": "^6.3.5",
46+
"vite-plugin-compression": "^0.5.1",
47+
"vite-plugin-css-injected-by-js": "^3.5.2",
48+
"vue-tsc": "^2.2.10"
49+
},
50+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
5151
}

webapp/tsconfig.config.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
2-
"extends": ["@tsconfig/node22/tsconfig.json", "@vue/tsconfig/tsconfig.json"],
3-
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*"],
2+
"extends": [
3+
"@tsconfig/node22/tsconfig.json",
4+
"@vue/tsconfig/tsconfig.json"
5+
],
6+
"include": [
7+
"vite.config.*",
8+
"vitest.config.*",
9+
"cypress.config.*"
10+
],
411
"compilerOptions": {
512
"noEmit": false,
613
"composite": true,
7-
"types": ["node"]
14+
"types": [
15+
"node"
16+
]
817
}
918
}

webapp/vite.config.ts

Lines changed: 81 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { fileURLToPath, URL } from 'node:url';
1+
import { fileURLToPath, URL } from 'node:url'
22

3-
import { defineConfig } from 'vite';
4-
import vue from '@vitejs/plugin-vue';
3+
import { defineConfig } from 'vite'
4+
import vue from '@vitejs/plugin-vue'
55

66
import viteCompression from 'vite-plugin-compression';
7-
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
8-
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
7+
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js'
8+
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
99

10-
import path from 'path';
10+
import path from 'path'
1111

1212
// example 'vite.user.ts': export const proxy_target = '192.168.16.107'
1313
let proxy_target;
@@ -19,80 +19,78 @@ try {
1919
}
2020

2121
// https://vitejs.dev/config/
22-
export default defineConfig(({ command }) => {
23-
return {
24-
plugins: [
25-
vue(),
26-
viteCompression({ deleteOriginFile: true, threshold: 0 }),
27-
cssInjectedByJsPlugin(),
28-
VueI18nPlugin({
29-
/* options */
30-
include: path.resolve(path.dirname(fileURLToPath(import.meta.url)), './src/locales/**.json'),
31-
runtimeOnly: false,
32-
fullInstall: false,
33-
forceStringify: true,
34-
strictMessage: false,
35-
}),
36-
],
37-
resolve: {
38-
alias: {
39-
'@': fileURLToPath(new URL('./src', import.meta.url)),
40-
'~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'),
41-
},
42-
},
43-
build: {
44-
// Prevent vendor.css being created
45-
cssCodeSplit: false,
46-
outDir: '../webapp_dist',
47-
emptyOutDir: true,
48-
minify: 'terser',
49-
chunkSizeWarningLimit: 1024,
50-
rollupOptions: {
51-
output: {
52-
// Only create one js file
53-
inlineDynamicImports: true,
54-
// Get rid of hash on js file
55-
entryFileNames: 'js/app.js',
56-
// Get rid of hash on css file
57-
assetFileNames: 'assets/[name].[ext]',
58-
},
59-
},
60-
target: 'es2022',
61-
},
62-
esbuild: {
63-
drop: command !== 'serve' ? ['console', 'debugger'] : [],
64-
},
65-
server: {
66-
proxy: {
67-
'^/api': {
68-
target: 'http://' + proxy_target,
69-
},
70-
'^/livedata': {
71-
target: 'ws://' + proxy_target,
72-
ws: true,
73-
changeOrigin: true,
74-
},
75-
'^/solarchargerlivedata': {
76-
target: 'ws://' + proxy_target,
77-
ws: true,
78-
changeOrigin: true,
79-
},
80-
'^/batterylivedata': {
81-
target: 'ws://' + proxy_target,
82-
ws: true,
83-
changeOrigin: true,
84-
},
85-
'^/gridchargerlivedata': {
86-
target: 'ws://' + proxy_target,
87-
ws: true,
88-
changeOrigin: true,
89-
},
90-
'^/console': {
91-
target: 'ws://' + proxy_target,
92-
ws: true,
93-
changeOrigin: true,
94-
},
95-
},
96-
},
97-
};
98-
});
22+
export default defineConfig(({ command }) => { return {
23+
plugins: [
24+
vue(),
25+
viteCompression({ deleteOriginFile: true, threshold: 0 }),
26+
cssInjectedByJsPlugin(),
27+
VueI18nPlugin({
28+
/* options */
29+
include: path.resolve(path.dirname(fileURLToPath(import.meta.url)), './src/locales/**.json'),
30+
runtimeOnly: false,
31+
fullInstall: false,
32+
forceStringify: true,
33+
strictMessage: false,
34+
}),
35+
],
36+
resolve: {
37+
alias: {
38+
'@': fileURLToPath(new URL('./src', import.meta.url)),
39+
'~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'),
40+
}
41+
},
42+
build: {
43+
// Prevent vendor.css being created
44+
cssCodeSplit: false,
45+
outDir: '../webapp_dist',
46+
emptyOutDir: true,
47+
minify: 'terser',
48+
chunkSizeWarningLimit: 1024,
49+
rollupOptions: {
50+
output: {
51+
// Only create one js file
52+
inlineDynamicImports: true,
53+
// Get rid of hash on js file
54+
entryFileNames: 'js/app.js',
55+
// Get rid of hash on css file
56+
assetFileNames: "assets/[name].[ext]",
57+
},
58+
},
59+
target: 'es2022',
60+
},
61+
esbuild: {
62+
drop: command !== 'serve' ? ['console', 'debugger'] : []
63+
},
64+
server: {
65+
proxy: {
66+
'^/api': {
67+
target: 'http://' + proxy_target
68+
},
69+
'^/livedata': {
70+
target: 'ws://' + proxy_target,
71+
ws: true,
72+
changeOrigin: true
73+
},
74+
'^/solarchargerlivedata': {
75+
target: 'ws://' + proxy_target,
76+
ws: true,
77+
changeOrigin: true
78+
},
79+
'^/batterylivedata': {
80+
target: 'ws://' + proxy_target,
81+
ws: true,
82+
changeOrigin: true
83+
},
84+
'^/gridchargerlivedata': {
85+
target: 'ws://' + proxy_target,
86+
ws: true,
87+
changeOrigin: true
88+
},
89+
'^/console': {
90+
target: 'ws://' + proxy_target,
91+
ws: true,
92+
changeOrigin: true
93+
}
94+
}
95+
}
96+
} })

0 commit comments

Comments
 (0)