-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.js
39 lines (38 loc) · 971 Bytes
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import {fileURLToPath, URL} from 'node:url'
import {resolve} from 'path'
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import basicSsl from '@vitejs/plugin-basic-ssl'
export default defineConfig({
plugins: [
vue(),
basicSsl(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
extensions: ['.vue', '.tsx', '.ts', '.mjs', '.js', '.jsx', '.json', '.wasm'],
},
server: {
host: '0.0.0.0',
port: 8081,
// Our ORCID app only has a limited set of legal redirect URLs (which
// includes 127.0.0.1:8081 but not all other ports), so fail if the desired
// port is occupied.
strictPort: true,
},
preview: {
host: '0.0.0.0',
port: 8082,
// Same as above, but 127.0.0.1:8082 is also legal per ORCID.
strictPort: true,
},
build: {
rollupOptions: {
input: {
'index': resolve(__dirname, 'index.html'),
},
},
},
})