-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
61 lines (59 loc) · 1.97 KB
/
vite.config.js
File metadata and controls
61 lines (59 loc) · 1.97 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import fs from 'node:fs';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { defineConfig } from 'vite';
const __dirname = dirname(fileURLToPath(import.meta.url));
export default defineConfig({
// root: 'src', // this does not work -> 404
server: {
host: '127.0.0.1',
port: 5501,
open: true,
https: {
key: fs.readFileSync('./_cert/cert.key'), //
cert: fs.readFileSync('./_cert/cert.crt'),
passphrase: '2255'
},
// proxy: {
// '/api': {
// target: 'https://localhost:8000',
// changeOrigin: true,
// secure: false,
// rewrite: (path) => path
// }
// }
},
preview: {
host: '127.0.0.1',
port: 5502,
open: true
},
build: {
minify: false, // enable for prod
// rollupOptions: {
// input: {
// main: resolve(__dirname, 'index.html'),
// ['_layout/tokenhtml']: resolve(
// __dirname,
// '_layout/tokenhtml/index.html'
// ),
// ['page-not-found']: resolve(
// __dirname,
// 'page-not-found/index.html'
// ),
// ['page-assets']: resolve(__dirname, 'page-assets/index.html')
// },
// output: {
// entryFileNames: `page-not-found/entry-[name].js`,
// // chunkFileNames: `page-not-found/chunk-[name].js`,
// chunkFileNames: (chunk) =>
// chunk.name.startsWith('portal')
// ? `page-assets/chunk-[name].js`
// : `page-not-found/chunk-[name].js`,
// assetFileNames: `page-not-found/asset-[name].[ext]`
// }
// },
assetsDir: 'page-not-found'
},
base: '/'
});