Skip to content

Fix: Remove bootstrap.js import for Laravel 13+ in Inertia stack#1602

Merged
taylorotwell merged 2 commits into
laravel:5.xfrom
Karthi282k:fix-laravel-13-bootstrap-import
May 19, 2026
Merged

Fix: Remove bootstrap.js import for Laravel 13+ in Inertia stack#1602
taylorotwell merged 2 commits into
laravel:5.xfrom
Karthi282k:fix-laravel-13-bootstrap-import

Conversation

@Karthi282k
Copy link
Copy Markdown
Contributor

When installing the Jetstream Inertia stack on a fresh Laravel 13 application, the installation currently fails when running npm run build.

Because Laravel 13 no longer includes the resources/js/bootstrap.js file by default, the Jetstream installer stubbing out import './bootstrap'; in resources/js/app.js causes Vite to throw an [UNRESOLVED_IMPORT] error.

This PR adds a version check during the Inertia installation process. If the application is running Laravel 13 or higher, the import line is dynamically removed from the copied app.js file, allowing Vite to build successfully.

Note regarding the Livewire stack: I only applied this change to the Inertia installation logic. The Livewire stack does not copy a custom app.js stub (it relies on the default framework skeleton), so it does not suffer from this bug and did not need to be updated.

@taylorotwell taylorotwell merged commit 61cac5c into laravel:5.x May 19, 2026
1 check passed
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