2018-11-30 22:54:11 +03:00
|
|
|
// this runs synchronously
|
2018-12-05 12:28:30 +03:00
|
|
|
// require('./copy')
|
2018-11-30 22:54:11 +03:00
|
|
|
|
2018-12-04 02:54:04 +03:00
|
|
|
const {join, resolve} = require('path')
|
2018-11-30 22:54:11 +03:00
|
|
|
const withPlugins = require('next-compose-plugins')
|
2018-12-05 00:53:49 +03:00
|
|
|
const configure = require('./lib/config')
|
2018-12-05 03:32:55 +03:00
|
|
|
const css = require('@zeit/next-css')
|
2018-12-05 11:59:56 +03:00
|
|
|
const sass = require('@zeit/next-sass')
|
2018-11-30 22:54:11 +03:00
|
|
|
|
2018-12-05 12:40:20 +03:00
|
|
|
const {NODE_ENV, NOW_URL} = process.env
|
2018-12-05 12:28:30 +03:00
|
|
|
const assetPrefix = NOW_URL || ''
|
2018-11-30 22:54:11 +03:00
|
|
|
|
2018-12-05 00:37:31 +03:00
|
|
|
module.exports = withPlugins([
|
2018-12-05 11:59:56 +03:00
|
|
|
css(sass({
|
|
|
|
sassLoaderOptions: {
|
2018-12-05 12:28:30 +03:00
|
|
|
includePaths: [
|
|
|
|
resolve(__dirname, '../modules')
|
|
|
|
]
|
2018-12-05 11:59:56 +03:00
|
|
|
}
|
|
|
|
})),
|
2018-12-05 00:53:49 +03:00
|
|
|
configure()
|
2018-12-05 00:37:31 +03:00
|
|
|
], {
|
2018-11-30 22:54:11 +03:00
|
|
|
/*
|
|
|
|
* Note: Prefixing assets with the fully qualified deployment URL
|
|
|
|
* makes them available even when the site is served from a path alias, as in
|
2018-12-05 12:28:30 +03:00
|
|
|
* <https://primer.style/css>
|
2018-11-30 22:54:11 +03:00
|
|
|
*/
|
2018-12-05 12:28:30 +03:00
|
|
|
assetPrefix,
|
|
|
|
pageExtensions: ['js', 'jsx', 'md', 'mdx'],
|
2018-11-30 22:54:11 +03:00
|
|
|
publicRuntimeConfig: {
|
2018-12-05 12:40:20 +03:00
|
|
|
assetPrefix,
|
|
|
|
production: NODE_ENV === 'production'
|
2018-11-30 22:54:11 +03:00
|
|
|
}
|
|
|
|
})
|