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
If your development web server is running on HTTPS, including Valet's [secure command](/docs/{{version}}/valet#securing-sites), you may run into issues connecting to the Vite development server. You may configure Vite to also run on HTTPS by adding the following to your `vite.config.js` configuration file:
134
+
If your local development web server is serving your application via HTTPS, you may run into issues connecting to the Vite development server.
135
+
136
+
If you are using [Laravel Valet](/docs/{{version}}/valet) for local development and have run the [secure command](/docs/{{version}}/valet#securing-sites) against your application, you may configure the Vite development server to automatically use Valet's generated TLS certificates:
135
137
136
138
```js
139
+
import { defineConfig } from'vite';
140
+
importlaravelfrom'laravel-vite-plugin';
141
+
142
+
exportdefaultdefineConfig({
143
+
plugins: [
144
+
laravel({
145
+
// ...
146
+
valetTls:'my-app.test', // [!tl add]
147
+
}),
148
+
],
149
+
});
150
+
```
151
+
152
+
When using another web server, you should generate a trusted certificate and manually configure Vite to use the generated certificates:
You will also need to accept the certificate warning for Vite's development server in your browser by following the "Local" link in your console when running the `npm run dev` command.
173
+
If you are unable to generate a trusted certificate for your system, you may install and configure the [`@vitejs/plugin-basic-ssl` plugin](https://github.com/vitejs/vite-plugin-basic-ssl). When using untrusted certificates, you will need to accept the certificate warning for Vite's development server in your browser by following the "Local" link in your console when running the `npm run dev` command.
0 commit comments