forked from dddwa/dddperth-website
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
76 lines (73 loc) · 1.8 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
const withBundleAnalyzer = require('@zeit/next-bundle-analyzer')
const {
BundleAnalyzerPlugin
} = require('webpack-bundle-analyzer')
const withTypescript = require('@zeit/next-typescript')
const withSass = require('@zeit/next-sass')
module.exports = withSass(
withTypescript(
withBundleAnalyzer({
analyzeServer: ['server', 'both'].includes(process.env.BUNDLE_ANALYZE),
analyzeBrowser: ['browser', 'both'].includes(process.env.BUNDLE_ANALYZE),
webpack: (config, {
dev
}) => {
if (!dev) {
const originalEntry = config.entry;
config.entry = async () => {
const entries = await originalEntry();
if (entries['main.js']) {
entries['main.js'].unshift('./static/scripts/es6-shim.js');
}
return entries;
};
}
return config;
},
exportPathMap: function () {
return {
'/': {
page: '/'
},
'/about': {
page: '/about'
},
'/agenda': {
page: '/agenda'
},
'/agenda/2017': {
page: '/agenda/2017'
},
'/agenda/2016': {
page: '/agenda/2016'
},
'/cfp': {
page: '/cfp'
},
'/sponsorship': {
page: '/sponsorship'
},
'/venue': {
page: '/venue'
},
'/code-of-conduct': {
page: '/code-of-conduct'
},
'/contact': {
page: '/contact'
},
'/faq': {
page: '/faq'
},
'/tickets': {
page: '/tickets'
},
'/vote': {
page: '/vote'
}
}
},
poweredByHeader: false
})
)
)