-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathnext.config.js
More file actions
32 lines (24 loc) · 773 Bytes
/
next.config.js
File metadata and controls
32 lines (24 loc) · 773 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
32
const withTM = require('@weco/next-plugin-transpile-modules')
const withSass = require('@zeit/next-sass')
const routing = require('./routing')
const isProd = process.env.NODE_ENV === 'production'
const assetPrefix = isProd ? process.env.ASSET_URL : ''
module.exports = withTM(withSass({
port: process.env.APP_PORT || 80,
transpileModules: [],
publicRuntimeConfig: {
asset_url: process.env.ASSET_URL,
apollo: {
link: {
uri: process.env.API_URL,
}
},
},
// use css modules with sass
// https://github.com/zeit/next-plugins/tree/master/packages/next-sass#with-css-modules
cssModules: false,
// turn off file based routing
// https://github.com/zeit/next.js#disabling-file-system-routing
useFileSystemPublicRoutes: false,
assetPrefix,
}))