Skip to content

Instantly share code, notes, and snippets.

@nadyshalaby
Created September 5, 2022 09:04
Show Gist options
  • Save nadyshalaby/05587e8f5f1ffbb37847127a852b1608 to your computer and use it in GitHub Desktop.
Save nadyshalaby/05587e8f5f1ffbb37847127a852b1608 to your computer and use it in GitHub Desktop.
Enable SSL on Laravel Vite Project
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
server: {
https: {
key: "/opt/homebrew/etc/httpd/certs/syanat-app.test-key.pem",
cert: "/opt/homebrew/etc/httpd/certs/syanat-app.test.pem",
},
host: 'syanat-app.test',
hmr: {
host: 'syanat-app.test',
},
},
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
],
refresh: true,
}),
],
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment