Skip to content

Commit

Permalink
upd: #1278; build::manualChunks cont;
Browse files Browse the repository at this point in the history
  • Loading branch information
migbash committed Aug 2, 2023
1 parent 039d0c7 commit 6b19c53
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,29 @@ export default defineConfig

// ### NOTE:
// ### testing for 'per-page' component build split.
if (id.includes('src/lib/components/_main_'))
return 'M-main-single-chunk';
if (id.includes('src/lib/components/page/home'))
return 'M-homepage-single-chunk';
if (id.includes('src/lib/store/'))
return 'M-stores-single-chunk';
// ### NOTE:
// ### works well, but at times incosistent.
// if (id.includes('src/lib/components/_main_'))
// return 'M-main-single-chunk';
// ;
// if (id.includes('src/lib/components/page/home'))
// return 'M-homepage-single-chunk';
// ;
// if (id.includes('src/lib/store/'))
// return 'M-stores-single-chunk';
// ;
// if (id.includes('src/lib/firebase/'))
// return 'M-firebase-single-chunk';
// ;

if (id.includes('src/'))
return 'M-single-chunk';
;

// ### NOTE:
// ### gives error of 'dev' issue [?]
// if (id.includes('src/lib/utils/'))
// return 'M-utils-single-chunk';
if (id.includes('src/lib/firebase/'))
return 'M-firebase-single-chunk';

// ### SEE:
// ### 1st comment - https://stackoverflow.com/a/71578633/8421215
Expand Down

0 comments on commit 6b19c53

Please sign in to comment.