I'm new in Next.js, regular to work with create-react-app (ejected).
With the configuration in create-react-app I was able to work with SCSS not in CSS-module approach, but with split SCSS files.
For example:
ComponentA.jsx
import React from 'react';
import './ComponentA.scss';
const ComponentA = () => {
}
ComponentB.jsx
import React from 'react';
import './ComponentB.scss';
const ComponentB = () => {
}
I have read the following:
https://medium.com/@vladymyr.pylypchatin/the-simple-way-to-use-scoped-and-global-scss-with-next-js-67cdb2d0c676
NextJS component level SASS styling
But these solutions don't fit my needs.
My question:
There is a a way to write local SCSS files for each component, with put CSS-module approach or <style jsx> approach, just import SCSS (like in the example I added) for each component?, (I'm aware of the scoping issue, I will manage the class names manually by myself).
But keep the bundle to one large CSS file when the bundle is built, as webpack does.
Thanks.