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
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,17 +184,17 @@ And you may remove your Mix configuration file:
184
184
rm webpack.mix.js
185
185
```
186
186
187
-
If you are using StyleCI and have ignored the `webpack.mix.js` file in your configuration, you may also like to remove the ignore rule.
187
+
If you are using StyleCI and have ignored the `webpack.mix.js` file in your configuration, you may also wish to remove the ignore rule.
188
188
189
189
### Optional: Configure Tailwind
190
190
191
-
If you are using Tailwind, perhaps with one of Laravel's starter kits, you will need a `postcss.config.js` file. Tailwind can generate this for you automatically:
191
+
If you are using Tailwind, perhaps with one of Laravel's starter kits, you will need to create a `postcss.config.js` file. Tailwind can generate this for you automatically:
192
192
193
193
```shell
194
194
npx tailwindcss init -p
195
195
```
196
196
197
-
Or you can create it manually:
197
+
Or, you can create it manually:
198
198
199
199
```js
200
200
module.exports= {
@@ -209,7 +209,7 @@ If you are using other PostCSS plugins, such as `postcss-import`, you will need
209
209
210
210
### Optional: Git ignore the build directory
211
211
212
-
Vite will place all of your build assets into a `build` subdirectory inside your public directory. If you prefer to build your assets on deploy, instead of committing them to your repository, then you may wish to add this directory to your `.gitignore` file:
212
+
Vite will place all of your build assets into a `build` subdirectory inside your public directory. If you prefer to build your assets on deploy instead of committing them to your repository, you may wish to add this directory to your `.gitignore` file:
213
213
214
214
```gitignore
215
215
/public/build
@@ -223,7 +223,7 @@ You may remove your dedicated Laravel Mix SSR configuration:
223
223
rm webpack.ssr.mix.js
224
224
```
225
225
226
-
In most cases you won't need a dedicated SSR configuration file when using Vite. You can specify your SSR entry point by passing a configuration option to the Laravel plugin:
226
+
In most cases, you won't need a dedicated SSR configuration file when using Vite. You can specify your SSR entry point by passing a configuration option to the Laravel plugin:
227
227
228
228
```js
229
229
import { defineConfig } from'vite'
@@ -249,7 +249,7 @@ You may wish to add the following additional scripts to your `package.json`:
249
249
}
250
250
```
251
251
252
-
If you prefer to build your assets on deploy, instead of committing them to your repository, then you may wish to add the SSR output directory to your `.gitignore` file:
252
+
If you prefer to build your assets on deploy instead of committing them to your repository, you may wish to add the SSR output directory to your `.gitignore` file:
253
253
254
254
```gitignore
255
255
/storage/ssr
@@ -261,27 +261,27 @@ You may start the SSR server using `node`:
261
261
node storage/ssr/ssr.js
262
262
```
263
263
264
-
### Wrapping Up
264
+
### Wrapping up
265
265
266
-
You should now be able to build your assets using the following command. This will also invoke the Vite server and Vite will watch for file changes:
266
+
You should now be able to build your assets using `dev` command. This will also invoke the Vite server and Vite will watch for file changes:
267
267
268
268
```shell
269
269
npm run dev
270
270
```
271
271
272
-
Alternatively, if you need to build files without watching or if you need to build them for production, you may use the following command:
272
+
Alternatively, if you need to build files without watching or if you need to build them for production, you may use the `build` command:
273
273
274
274
```shell
275
275
npm run build
276
276
```
277
277
278
-
For further info on how to use Vite, please check out [the documentation](https://laravel.com/docs/vite).
278
+
For further information on how to use Vite, please check out [the Laravel Vite documentation](https://laravel.com/docs/vite).
279
279
280
280
## Migrating from Vite to Laravel Mix
281
281
282
282
### Install Laravel Mix
283
283
284
-
First you will need to install Laravel Mix using your npm package manager of choice:
284
+
First, you will need to install Laravel Mix using your npm package manager of choice:
285
285
286
286
```shell
287
287
npm install --save-dev laravel-mix
@@ -371,7 +371,7 @@ You will also need to update these references in your JavaScript code to use the
371
371
372
372
### Remove CSS imports from your JavaScript entry point(s)
373
373
374
-
If you are importing your CSS via JavaScript, you will need to remove them:
374
+
If you are importing your CSS via JavaScript, you will need to remove these statements:
375
375
376
376
```js
377
377
-import'../css/app.css'
@@ -396,7 +396,7 @@ Vite and the Laravel Plugin can now be uninstalled:
396
396
npm remove vite laravel-vite-plugin
397
397
```
398
398
399
-
And you may remove your Vite configuration file:
399
+
Next, you may remove your Vite configuration file:
0 commit comments