Skip to content

Commit 80e2145

Browse files
committed
Add exclude list for optimizeDeps in Vite config
Threat all sprinkles as source code (not already built) and tells Vite not to prebundle it
1 parent 46624a5 commit 80e2145

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99
> This file contains the changelog of the Skeleton itself. You should replace it with your own Changelog!
1010
1111
## [6.0.0-beta.4](https://github.com/userfrosting/UserFrosting/compare/6.0.0-beta.3...6.0.0-beta.4)
12-
- Fix missing Composer dependency
12+
- Add exclude list for optimizeDeps in Vite config
1313

1414
## [6.0.0-beta.3](https://github.com/userfrosting/UserFrosting/compare/6.0.0-beta.2...6.0.0-beta.3)
1515
- Add 'limax' to optimizeDeps (Prevents "importing binding name 'default' cannot be resolved by star export entries")

vite.config.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,18 @@ export default defineConfig({
3939
}
4040
}
4141
},
42-
// Force optimization of UiKit in dev mode to avoid to avoid the error:
42+
// Force optimization of UiKit and limax (not module packages) in dev mode
43+
// to avoid the error:
4344
// "importing binding name 'default' cannot be resolved by star export entries"
45+
// Also, treat all sprinkles as source code (not prebuilt) and tell Vite
46+
// not to prebundle them.
4447
optimizeDeps: {
45-
include: ['uikit', 'uikit/dist/js/uikit-icons', 'limax']
48+
include: ['uikit', 'uikit/dist/js/uikit-icons', 'limax'],
49+
exclude: [
50+
'@userfrosting/sprinkle-core',
51+
'@userfrosting/sprinkle-account',
52+
'@userfrosting/sprinkle-admin',
53+
'@userfrosting/theme-pink-cupcake'
54+
]
4655
}
4756
})

0 commit comments

Comments
 (0)