forked from stacks-archive/app.co
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
31 lines (30 loc) · 927 Bytes
/
next.config.js
File metadata and controls
31 lines (30 loc) · 927 Bytes
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 path = require('path')
const webpackConfig = require('./webpack.config')
const withMDX = require('@zeit/next-mdx')({
extension: /\.mdx?$/
})
const withBundleAnalyzer = require("@zeit/next-bundle-analyzer")
module.exports = withBundleAnalyzer(withMDX({
exportPathMap: async function (defaultPathMap) {
return {
'/': { page: '/mining' },
}
},
pageExtensions: ['js', 'jsx', 'md', 'mdx'],
webpack: (config, { buildId, dev, isServer, defaultLoaders }) => {
config.resolve = webpackConfig.resolve
return config
},
analyzeServer: ["server", "both"].includes(process.env.BUNDLE_ANALYZE),
analyzeBrowser: ["browser", "both"].includes(process.env.BUNDLE_ANALYZE),
bundleAnalyzerConfig: {
server: {
analyzerMode: 'static',
reportFilename: './bundles/server.html'
},
browser: {
analyzerMode: 'static',
reportFilename: './bundles/client.html'
}
}
}))