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
+38-2Lines changed: 38 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,12 @@ Update your NPM scripts in `package.json`:
102
102
}
103
103
```
104
104
105
+
You should also add `"type": "module"` as a top-level key / value pair to your project's `package.json` by running the following command:
106
+
107
+
```shell
108
+
npm pkg set type="module"
109
+
```
110
+
105
111
### Vite compatible imports
106
112
107
113
Vite only supports ES modules, so if you are upgrading an existing application you will need to replace any `require()` statements with `import`. You may refer to [this pull request](https://github.com/laravel/laravel/pull/5895/files) for an example.
@@ -265,7 +271,37 @@ Then you will need to specify the base URL for assets in your application's entr
265
271
266
272
### Optional: Configure Tailwind
267
273
268
-
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:
274
+
If you are using Tailwind, perhaps with one of Laravel's starter kits, you will need migrate your `tailwind.config.js` to use [Vite compatible imports](#vite-compatible-imports) and exports.
0 commit comments