From cb9d2f220f375bf1d8d1ce4751c8ee58cf7f23c8 Mon Sep 17 00:00:00 2001 From: "M. Bestami" Date: Fri, 24 Oct 2025 12:03:32 +0300 Subject: [PATCH] =?UTF-8?q?-=20build=20i=C3=A7in=20dosyalar=20ayr=C4=B1=20?= =?UTF-8?q?kaydedilecek=20=C5=9Fekilde=20d=C3=BCzenleme=20yap=C4=B1ld?= =?UTF-8?q?=C4=B1=20-=20gereksiz=20paketler=20package.json=20dan=20silindi?= =?UTF-8?q?=20-=20Kullan=C4=B1lmayan=20quill=20dosyalar=C4=B1=20silindi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configs.ts | 23 +++ package.json | 2 - src/components/global/FormQuill.vue | 210 --------------------- src/components/global/ListTableContent.vue | 1 - src/components/global/PanelFilter.vue | 2 - src/components/global/index.ts | 2 - tsconfig.app.json | 2 +- tsconfig.node.json | 5 +- vite.config.ts | 43 +++++ 9 files changed, 70 insertions(+), 220 deletions(-) create mode 100644 Configs.ts delete mode 100644 src/components/global/FormQuill.vue diff --git a/Configs.ts b/Configs.ts new file mode 100644 index 0000000..742db71 --- /dev/null +++ b/Configs.ts @@ -0,0 +1,23 @@ +// build olurken bazı klasorlerin ayri script olarak kaydedilmesi +export const TEMPLATE_CHUNK_GROUPS: Record = { + store: [/\/src\/stores\//], + lott: [/\/src\/module\/cekilisler\//], + user: [/\/src\/module\/kullanicilar\//], + cust: [/\/src\/module\/uyeler\//], + acc: [/\/src\/module\/muhasebe\//], + site: [/\/src\/module\/site-yonetimi\//], + aut: [/\/src\/module\/auth\//] +} + +// id -> group_name +export function SetTemplateGroup(id: string): string | undefined { + const cleanId = id.split('?')[0] + for (const [group, pats] of Object.entries(TEMPLATE_CHUNK_GROUPS)) { + if ( + pats.some((p) => (typeof p === 'string' ? cleanId.includes(p) : p.test(cleanId))) + ) { + return group + } + } + return undefined +} diff --git a/package.json b/package.json index 49554c5..8a4c5bd 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,6 @@ "jquery": "^3.7.1", "parchment": "^3.0.0", "pinia": "^2.1.7", - "quill": "^2.0.3", - "quill-image-resize-module": "^3.0.0", "summernote": "^0.9.1", "uuid": "^11.1.0", "vue": "^3.4.29", diff --git a/src/components/global/FormQuill.vue b/src/components/global/FormQuill.vue deleted file mode 100644 index ed4bac2..0000000 --- a/src/components/global/FormQuill.vue +++ /dev/null @@ -1,210 +0,0 @@ - - - diff --git a/src/components/global/ListTableContent.vue b/src/components/global/ListTableContent.vue index 531210a..03f099b 100644 --- a/src/components/global/ListTableContent.vue +++ b/src/components/global/ListTableContent.vue @@ -455,7 +455,6 @@ const RouteFilterControl = () => { if (props.isUseRoute) { filterChanging.value = true - console.log('c', localFilterParams.value, route.query) if (Object.keys(route.query).length > 0) { Object.keys(route.query).forEach((key) => { if (key.includes('Filters[')) { diff --git a/src/components/global/PanelFilter.vue b/src/components/global/PanelFilter.vue index ffbf904..6b1ab75 100644 --- a/src/components/global/PanelFilter.vue +++ b/src/components/global/PanelFilter.vue @@ -106,13 +106,11 @@ d: Record, ext: Record ) => { - console.log(v,d) if (v !== '' && v !== null) { ext.f.values[0].val = v ext.f.values[0].text = d[ext.k] ext.f.filter = true } else { - console.log("-----") ext.f.filter = false ext.f.values[0].text = '' } diff --git a/src/components/global/index.ts b/src/components/global/index.ts index 1552475..a1279d3 100644 --- a/src/components/global/index.ts +++ b/src/components/global/index.ts @@ -5,7 +5,6 @@ import FormInput from './FormInput.vue' import FormDate from './FormDate.vue' import FormFile from './FormFile.vue' import FormTextarea from './FormTextarea.vue' -import FormQuill from './FormQuill.vue' import FormSummer from './FormSummer.vue' import FormSelect from './FormSelect.vue' import FormRadio from './FormRadio.vue' @@ -25,7 +24,6 @@ export { FormDate, FormFile, FormTextarea, - FormQuill, FormSummer, FormSelect, FormRadio, diff --git a/tsconfig.app.json b/tsconfig.app.json index e14c754..c0d82c0 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -1,6 +1,6 @@ { "extends": "@vue/tsconfig/tsconfig.dom.json", - "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], + "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "Configs.ts"], "exclude": ["src/**/__tests__/*"], "compilerOptions": { "composite": true, diff --git a/tsconfig.node.json b/tsconfig.node.json index f094063..7f2aa05 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -1,11 +1,12 @@ { - "extends": "@tsconfig/node20/tsconfig.json", + "extends": "./tsconfig.json", "include": [ "vite.config.*", "vitest.config.*", "cypress.config.*", "nightwatch.conf.*", - "playwright.config.*" + "playwright.config.*", + "Configs.ts" ], "compilerOptions": { "composite": true, diff --git a/vite.config.ts b/vite.config.ts index 3f16b4c..fbb0abd 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,6 +3,7 @@ import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' +import { SetTemplateGroup } from './Configs.js' // https://vitejs.dev/config/ export default defineConfig({ @@ -23,5 +24,47 @@ export default defineConfig({ }, esbuild: { drop: process.env.NODE_ENV === 'production' ? ['console', 'debugger'] : [] + }, + build: { + rollupOptions: { + output: { + manualChunks(id) { + if (id.includes('/src/')) { + const group = SetTemplateGroup(id) + if (group) return `grp_${group}` // group files + } + + // jquery files + if (id.includes('node_modules/jquery')) return 'ven_jquery' + if (id.includes('node_modules/summernote')) return 'ven_summer' + if (id.includes('node_modules/pdfmake')) return 'ven_pdfmake' + if (id.includes('node_modules/html-to-pdfmake')) return 'ven_pdfmake' + if (id.includes('node_modules/vue3-pdfmake')) return 'ven_pdfmake' + if (id.includes('node_modules/vuedraggable')) return 'ven_drg' + + // other node_modules files + if (id.includes('node_modules')) return 'vendor' + }, + assetFileNames: (assetInfo) => { + const name = assetInfo.names?.[0] || assetInfo.name || '' + + if (name.endsWith('.css')) { + return 'static/css/[name]-[hash][extname]' + } + if (/\.(png|jpe?g|svg|gif|webp|ico)$/i.test(name)) { + return 'static/images/[name]-[hash][extname]' + } + if (/\.(ttf|woff2?|eot|otf)$/i.test(name)) { + return 'static/fonts/[name]-[hash][extname]' + } + return 'static/[name]-[hash][extname]' + }, + chunkFileNames: (chunkInfo) => { + if (chunkInfo.name?.startsWith('grp_')) return 'static/js/[name]-[hash].js' + return 'static/js/[name]-[hash].js' + }, + entryFileNames: 'static/js/[name]-[hash].js' + } + } } })