Skip to content

Commit bdd3d59

Browse files
fix(vitrify): fix manualChunksFn
1 parent 80adca2 commit bdd3d59

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.changeset/young-planes-type.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'vitrify': patch
3+
---
4+
5+
fix(vitrify): fix manualChunksFn

packages/vitrify/src/node/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,16 @@ const manualChunkNames = [
7474

7575
const moduleChunks = {
7676
vue: ['vue', '@vue', 'vue-router'],
77-
quasar: ['quasar', '@quasar']
77+
quasar: ['quasar'],
78+
atQuasar: ['@quasar']
7879
}
7980
const manualChunksFn = (manualChunkList?: string[]): ManualChunksOption => {
8081
return (id: string) => {
8182
const matchedModule = Object.entries(moduleChunks).find(
8283
([chunkName, moduleNames]) =>
83-
moduleNames.some((moduleName) => id.includes(moduleName + '/'))
84+
moduleNames.some((moduleName) =>
85+
new RegExp(`\/${moduleName}\/`).test(id)
86+
)
8487
)
8588
if (id.includes('vitrify/src/')) {
8689
const name = id.split('/').at(-1)?.split('.').at(0)

0 commit comments

Comments
 (0)