-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
47 lines (45 loc) · 1.07 KB
/
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
44
45
46
47
import path from 'path';
import { defineConfig } from 'vite';
import PuppeteerRenderer from '@prerenderer/renderer-puppeteer';
import prerender from '@prerenderer/rollup-plugin';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [
react(),
prerender({
routes: [
'/',
'/signin',
'/introduce',
'/apply',
'/apply/inquiry',
'/apply/frontend',
'/apply/backend',
'/apply/ai',
'/apply/android',
'/apply/designer',
'/team',
'/community',
'/techblog',
],
renderer: new PuppeteerRenderer({
maxConcurrentRoutes: 1,
renderAfterTime: 500,
}),
postProcess(route) {
route.html = route.html
.replace(/http:/g, 'https:')
.replace(
/(https:\/\/)?(localhost|127\.0\.0\.1):\d*/g,
'https://gdsc-knu.com/'
);
},
}),
],
resolve: {
alias: [{ find: '@gdg', replacement: path.resolve(__dirname, 'src') }],
},
define: {
global: {},
},
});