forked from lnfernal/2016-roblox
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
37 lines (36 loc) · 993 Bytes
/
next.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
const fs = require('fs');
const path = require('path');
const configPath = path.join(__dirname, path.sep + 'config.json');
if (!fs.existsSync(configPath)) {
throw new Error('Configuration could not be found at location: ' + configPath);
}
const config = JSON.parse(fs.readFileSync(configPath).toString('utf-8'));
module.exports = {
reactStrictMode: true,
serverRuntimeConfig: config.serverRuntimeConfig,
publicRuntimeConfig: config.publicRuntimeConfig,
async redirects() {
return [
{
source: '/catalog.aspx',
destination: '/catalog',
permanent: true,
},
/*
{
source: '/catalog/:id/:name',
destination: '/redirect-item?id=:id',
permanent: false,
},
*/
{
source: '/groups/:id/:name',
destination: '/My/Groups.aspx?gid=:id',
permanent: false,
},
]
},
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
return config
},
}