Skip to content

Instantly share code, notes, and snippets.

@ledunguit
Created November 8, 2022 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ledunguit/e2b292fda737d2353d8bca8e173fce61 to your computer and use it in GitHub Desktop.
Save ledunguit/e2b292fda737d2353d8bca8e173fce61 to your computer and use it in GitHub Desktop.
Vite config for laravel 9 with ssl
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
import * as fs from 'fs';
export default defineConfig({
server: {
https: {
cert: fs.readFileSync('./certs/example.com.crt'),
key: fs.readFileSync('./certs/example.com.key')
}
},
plugins: [
laravel({
input: [
'resources/sass/app.scss',
'resources/js/app.js',
],
refresh: true,
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
],
resolve: {
alias: {
vue: 'vue/dist/vue.esm-bundler.js',
},
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment