From 4551ca26a708f8bef500b26a0b93bff30964dc86 Mon Sep 17 00:00:00 2001 From: Ben James Date: Sat, 21 Feb 2026 08:53:37 +0000 Subject: [PATCH] docs: document Vite plugin auto-configuration during native:install - Note that Inertia projects get auto-configured during install - Document the --with-vite flag for skipping the prompt - Link from installation page to Vite plugin details --- .../views/docs/mobile/3/getting-started/development.md | 10 ++++++++-- .../docs/mobile/3/getting-started/installation.md | 5 +++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/resources/views/docs/mobile/3/getting-started/development.md b/resources/views/docs/mobile/3/getting-started/development.md index 62506e6a..7ae6ddca 100644 --- a/resources/views/docs/mobile/3/getting-started/development.md +++ b/resources/views/docs/mobile/3/getting-started/development.md @@ -38,8 +38,14 @@ To facilitate ease of development, you should install the `nativephpMobile` Vite ### The `nativephpMobile` Vite plugin -To make your frontend build process works well with NativePHP, simply add the `nativephpMobile` plugin to your -`vite.config.js`: +If you're using an Inertia (React or Vue) starter kit, `php artisan native:install` will offer to configure this for +you automatically. You can also skip the prompt by passing the `--with-vite` flag: + +```shell +php artisan native:install --with-vite +``` + +If you need to set it up manually, add the `nativephpMobile` plugin to your `vite.config.js`: ```js import { nativephpMobile, nativephpHotFile } from './vendor/nativephp/mobile/resources/js/vite-plugin.js'; // [tl! focus] diff --git a/resources/views/docs/mobile/3/getting-started/installation.md b/resources/views/docs/mobile/3/getting-started/installation.md index e2e91aac..bb525187 100644 --- a/resources/views/docs/mobile/3/getting-started/installation.md +++ b/resources/views/docs/mobile/3/getting-started/installation.md @@ -64,6 +64,11 @@ php artisan native:install The NativePHP installer takes care of setting up and configuring your Laravel application to work with iOS and Android. +If you're using an Inertia starter kit (React or Vue), the installer will offer to automatically configure the +[`nativephpMobile` Vite plugin](/docs/getting-started/development#the-codenativephpmobilecode-vite-plugin) in your +`vite.config.js`. This is required for HMR and correct asset loading on iOS. You can also pass `--with-vite` to skip +the prompt. + You may be prompted about whether you would like to install the ICU-enabled PHP binaries. You should install these if your application relies on the `intl` PHP extension.