Skip to content

Commit 8789714

Browse files
committed
Update UPGRADE.md
1 parent 753750f commit 8789714

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

UPGRADE.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ export default defineConfig({
5050

5151
If your entry point is not `resources/js/app.js`, you should read the [entry point docs](https://github.com/laravel/vite-plugin/blob/docs/docs/vite.md#entry-points) to learn how to configure the Laravel plugin for your project.
5252

53-
### Working with JSX
54-
55-
Any files containing JSX are required to have the `.jsx` or `.tsx` extension.
56-
5753
### Update NPM Scripts
5854

5955
Update your NPM scripts in `package.json`:
@@ -140,7 +136,7 @@ This will automatically detect whether you are running in serve or build mode an
140136
+ @vite
141137
```
142138

143-
If your entry point is not `resources/js/app.js`, you should read the [entry point docs](https://github.com/laravel/vite-plugin/blob/docs/docs/vite.md#entry-points) to learn how to use the `@vite` with different entry points.
139+
If your entry point is not `resources/js/app.js`, you should read the [entry point docs](https://github.com/laravel/vite-plugin/blob/docs/docs/vite.md#entry-points) to learn how to use the `@vite` directive with different entry points.
144140

145141
If you are manually including the HMR bundle, you can remove this as well:
146142

@@ -163,7 +159,7 @@ This loads a React "refresh runtime" in development mode only, which is required
163159

164160
### JavaScript files containing JSX must use a `.jsx` extension
165161

166-
You will need to rename any `.js` files containing JSX to instead have a `.jsx` extension.
162+
You will need to rename any `.js` files containing JSX to instead have a `.jsx` extension. If you need to rename your entry point then you should read the [entry point docs](https://github.com/laravel/vite-plugin/blob/docs/docs/vite.md#entry-points) to learn how to configure the Laravel plugin for your project.
167163

168164
See [this tweet](https://twitter.com/youyuxi/status/1362050255009816577) from Vite's creator for more information.
169165

@@ -218,22 +214,15 @@ Vite will place all of your build assets into a `build` subdirectory inside your
218214

219215
### Optional: Update SSR configuration
220216

221-
In your `vite.config.js` you can specify your SSR entry point by passing an configuration object to the `laravel` plugin:
222-
223-
```js
224-
laravel({
225-
input: 'resources/js/app.js',
226-
ssr: 'resources/js/ssr.js',
227-
})
228-
```
229-
230-
In most cases you won't need a dedicated SSR configuration file. You may also remove your dedicated Laravel Mix SSR configuration:
217+
You may remove your dedicated Laravel Mix SSR configuration:
231218

232219
```shell
233220
rm webpack.ssr.mix.js
234221
```
235222

236-
You may now add additional scripts to your `package.json`:
223+
In most cases you won't need a dedicated SSR configuration file with Vite. If your SSR entry point is not `resources/js/ssr.js`, you should read the [entry point docs](https://github.com/laravel/vite-plugin/blob/docs/docs/vite.md#entry-points) to learn how to configure the Laravel plugin for your project.
224+
225+
You may wish to add the following additional scripts to your `package.json`:
237226

238227
```diff
239228
"scripts": {

0 commit comments

Comments
 (0)