-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.ts
43 lines (39 loc) · 963 Bytes
/
vite.config.ts
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
// https://vitejs.dev/config/
import { defineConfig } from 'vite';
import basicSsl from '@vitejs/plugin-basic-ssl';
import dns from 'dns';
import react from '@vitejs/plugin-react';
import htmlPlugin from 'vite-plugin-html-config';
import openGraphConfig from './openGraphConfig.js';
import { renameLocales } from './scripts/renameLocales';
dns.setDefaultResultOrder('verbatim');
const htmlPluginOpt = {
metas: Object.keys(openGraphConfig).map((key) => {
return ({
name: key,
content: openGraphConfig[key]
});
})
};
export default defineConfig({
resolve: {
alias: {
uikit: '/src/uikit/',
}
},
plugins: [
{
name: 'prepare',
buildStart() {
renameLocales();
}
},
react(),
htmlPlugin(htmlPluginOpt),
basicSsl(),
],
server: {
port: 3002,
https: true
},
});