1
1
mirror of https://github.com/primer/css.git synced 2024-11-30 19:53:11 +03:00
css/docs/next.config.js
2018-12-17 15:26:50 -08:00

34 lines
799 B
JavaScript

// this runs synchronously
// require('./copy')
const {join, resolve} = require('path')
const withPlugins = require('next-compose-plugins')
const configure = require('./lib/config')
const css = require('@zeit/next-css')
const sass = require('@zeit/next-sass')
const {NOW_URL} = process.env
const assetPrefix = NOW_URL || ''
module.exports = withPlugins([
css(sass({
sassLoaderOptions: {
includePaths: [
resolve(__dirname, '../modules')
]
}
})),
configure()
], {
/*
* Note: Prefixing assets with the fully qualified deployment URL
* makes them available even when the site is served from a path alias, as in
* <https://primer.style/css>
*/
assetPrefix,
pageExtensions: ['js', 'jsx', 'md', 'mdx'],
publicRuntimeConfig: {
assetPrefix
}
})