-
Notifications
You must be signed in to change notification settings - Fork 3
/
next.config.js
31 lines (28 loc) · 966 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
const { withNextein } = require('nextein/config')
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin')
const EnvironmentPlugin = require('webpack/lib/EnvironmentPlugin')
module.exports = withNextein({
webpack: (config) => {
config.plugins.push(
...[
process.env.ANALYZE &&
new BundleAnalyzerPlugin({
analyzerMode: 'static'
}),
new EnvironmentPlugin({
UA: 'UA-104061611-1'
}),
new ContextReplacementPlugin(
/highlight\.js[/\/]lib[/\/]languages$/,
/javascript|json|markdown|bash|yaml|xml/
)
].filter(Boolean)
)
return config
},
exportPathMap: () => ({
'/installation': { page: '/installation', query: {} }, // <-query is needed, otherwise shallow-eq returns error
'/configuration': { page: '/configuration', query: {} }
})
})