Last active
February 13, 2020 07:58
Star
You must be signed in to star a gist
Using Bulma, Sass and Image Optimization with NextJS configuration.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const withPlugins = require('next-compose-plugins'); | |
const optimizedImages = require('next-optimized-images'); | |
const withSass = require('@zeit/next-sass'); | |
const withCSS = require('@zeit/next-css'); | |
const nextConfig = { | |
webpack(config, options) { | |
config.module.rules.push({ | |
test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/, | |
use: { | |
loader: 'url-loader', | |
options: { | |
limit: 100000, | |
}, | |
}, | |
}); | |
return config; | |
}, | |
}; | |
module.exports = withPlugins( | |
[ | |
// CSS and Sass | |
[withCSS(withSass())], | |
// Image optimization | |
[optimizedImages], | |
], | |
// NextJS Configs | |
nextConfig, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment