Skip to content

Commit 4ca874e

Browse files
authored
Update app.js
1 parent 7f1c2c4 commit 4ca874e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

resources/js/app.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ const app = createApp(App)
2525
const head = createHead()
2626
const pinia = createPinia()
2727

28-
Object.entries(import.meta.glob('./**/*.vue', { eager: true })).forEach(([path, definition]) => {
28+
// Register global components (excluding pages and layouts to resolve code-splitting errors)
29+
Object.entries(import.meta.glob([
30+
'./**/*.vue',
31+
'!./pages/**/*.vue',
32+
'!./layouts/**/*.vue'
33+
], { eager: true })).forEach(([path, definition]) => {
2934
app.component(
3035
path
3136
.split('/')

0 commit comments

Comments
 (0)