Created
November 8, 2022 16:38
-
-
Save ledunguit/e2b292fda737d2353d8bca8e173fce61 to your computer and use it in GitHub Desktop.
Vite config for laravel 9 with ssl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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