Created
August 4, 2021 12:45
-
-
Save innocenzi/f1fdd21e515ac160581c94e4b4ab2456 to your computer and use it in GitHub Desktop.
vite-hmr-error
This file contains hidden or 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, Plugin } from 'vite' | |
import vue from '@vitejs/plugin-vue' | |
// TODO: should be taken from environment | |
const certificates = { | |
key: 'D:\\Programmes\\Laragon\\etc\\ssl\\laragon.key', | |
crt: 'D:\\Programmes\\Laragon\\etc\\ssl\\laragon.crt', | |
} | |
export default defineConfig(({ command }) => ({ | |
base: command === 'serve' ? '' : '/js/applications/calculateur-pluriannuel/dist/', | |
build: { | |
manifest: true, | |
rollupOptions: { | |
input: 'src/main.ts', | |
}, | |
}, | |
server: { | |
host: 'localhost', | |
port: 3000, | |
hmr: { | |
host: 'localhost', | |
port: 3000, | |
}, | |
cors: true, | |
https: { | |
maxVersion: 'TLSv1.2', | |
...certificates, | |
}, | |
}, | |
plugins: [ | |
vue(), | |
], | |
})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment