- build için dosyalar ayrı kaydedilecek şekilde düzenleme yapıldı
- gereksiz paketler package.json dan silindi - Kullanılmayan quill dosyaları silindi
This commit is contained in:
23
Configs.ts
Normal file
23
Configs.ts
Normal file
@ -0,0 +1,23 @@
|
||||
// build olurken bazı klasorlerin ayri script olarak kaydedilmesi
|
||||
export const TEMPLATE_CHUNK_GROUPS: Record<string, (RegExp | string)[]> = {
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user