vite-laravel-valet-tls-plugin
v0.0.1
Published
Laravel Valet TLS plugin for Vite.
Downloads
3
Readme
A Vite plugin to easily handle Laravel Valet TLS sites
The package contains a Vite plugin to easily handle Laravel Valet sites in Secure mode with TLS.
Installation
You can install the package via yarn:
yarn add vite-laravel-valet-tls-plugin
or npm:
npm install vite-laravel-valet-tls-plugin --save
Usage
Register the plugin in your vite config:
import laravelValetTlsPlugin from 'vite-laravel-valet-tls-plugin'
export default defineConfig({
plugins: [
//
laravelValetTlsPlugin(),
//
],
});
Make sure you specify your Valet app url in your .env
:
MIX_APP_URL=http://my-app.test
Optionally, you could explicitly set the Valet app url when configuring the plugin:
import laravelValetTlsPlugin from 'vite-laravel-valet-tls-plugin'
export default defineConfig({
plugins: [
//
laravelValetTlsPlugin({
host: 'my-app.test'
}),
//
],
});
The plugin will now automatically handle the certificates for you whenever running Vite in development mode.