0.0.1 • Published 11 months ago

vite-laravel-valet-tls-plugin v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

A Vite plugin to easily handle Laravel Valet TLS sites

Latest Version on NPM Software License npm

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.

0.0.1

11 months ago