You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UPGRADE.md
+6-17Lines changed: 6 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,10 +50,6 @@ export default defineConfig({
50
50
51
51
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.
52
52
53
-
### Working with JSX
54
-
55
-
Any files containing JSX are required to have the `.jsx` or `.tsx` extension.
56
-
57
53
### Update NPM Scripts
58
54
59
55
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
140
136
+ @vite
141
137
```
142
138
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.
144
140
145
141
If you are manually including the HMR bundle, you can remove this as well:
146
142
@@ -163,7 +159,7 @@ This loads a React "refresh runtime" in development mode only, which is required
163
159
164
160
### JavaScript files containing JSX must use a `.jsx` extension
165
161
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.
167
163
168
164
See [this tweet](https://twitter.com/youyuxi/status/1362050255009816577) from Vite's creator for more information.
169
165
@@ -218,22 +214,15 @@ Vite will place all of your build assets into a `build` subdirectory inside your
218
214
219
215
### Optional: Update SSR configuration
220
216
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:
231
218
232
219
```shell
233
220
rm webpack.ssr.mix.js
234
221
```
235
222
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`:
0 commit comments