-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.js
29 lines (29 loc) · 950 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
const withCSS = require('@zeit/next-css');
const withSass = require('@zeit/next-sass');
const withImages = require('next-images');
const isProd = process.env.NODE_ENV === 'production';
module.exports = withCSS(
withSass(
withImages({
cssModules: true,
serverRuntimeConfig: {},
publicRuntimeConfig: {
// Will be available on both server and client
// appContext: isProd ? '/hello-next/' : '/' // for gh-pages
appContext: '/',
},
// assetPrefix: isProd ? '/hello-next' : '', // for gh-pages
exportPathMap: function() {
return {
'/': { page: '/' },
'/about': { page: '/about' },
'/posts': { page: '/posts' },
'/p/975': { page: '/post', query: { id: 975 } },
'/p/504': { page: '/post', query: { id: 504 } },
'/login': { page: '/login' },
'/components': { page: '/components' }
};
}
})
)
);