gitmoji/next.config.js
Carlos Cuesta 18852ce299
♻️ Move website to Next.js (#368)
This commit updates the stack of the gitmoji website to Next.js. This was a thing I wanted to do a long time ago.

Our current stack was a little bit outdated and had issues with the Developer UX. The concept is the same, the whole site is built into a Static HTML site.

Also we can benefit from using React ⚛️ ❤️

The current stack will be:

Next.js
React
Flow
Scss
Prettier
Jest
2019-10-26 18:00:59 +02:00

20 lines
491 B
JavaScript

const withSass = require('@zeit/next-sass')
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
module.exports = withSass({
exportPathMap: function() {
return {
'/': { page: '/' },
'/about': { page: '/about' },
'/contributors': { page: '/contributors' }
}
},
webpack: (config, { dev, isServer }) => {
if (isServer) return config
config.optimization.minimizer.push(new OptimizeCSSAssetsPlugin({}))
return config
}
})