Using scss
in NextJS components/modules, the traditional way e.g. by passing the actual classname like a-b-c
instead of styles['a-b-c']
might seem a bit harder than expected. But actually it's supported out of the box. Just the next.config.js
requires a bit of tweaking.
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
webpack(config) {