Skip to content

Conversation

codisfy
Copy link

@codisfy codisfy commented Sep 3, 2025

Currently shows error when reloading a page. e.g.
image

This pull request makes a small update to the asset loading in the app.blade.php layout file. The change updates the Vite asset inclusion by only loading the main app.tsx file, rather than also including a page-specific JavaScript file, which leads to breaking page reloads on production build i.e. npm run build .

Removed dynamic page component from Vite entry as it break page reload on production builds
@joetannenbaum
Copy link
Contributor

This shouldn't break anything, are you sure npm run build succeeded? This is included to preload the component and speed up the first page load.

@codisfy
Copy link
Author

codisfy commented Sep 5, 2025

Yes, npm run build succeeded. This issue only appeared when someone refreshed the page. If they continued navigating through the app from the home page, it worked fine.

When using npm run dev, the error did not occur.

I opened a PR to remove the second element from the array, which resolved the issue for me.

Please feel free to close this if you determine it's not useful.

@pushpak1300
Copy link
Member

I tested this locally with a production build on a blank starter kit, and it worked without any issues. The error shown in the image seems to be coming from a custom component. Closing this for now.

@pushpak1300 pushpak1300 closed this Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants