How to configure CSS Mdoules with NWB on sass files

136 Views Asked by At

I am creating a react component with NWB. The folder structure looks like below.

* components/
** src/
*** Component1/
**** index.js
**** index.module.scss
*** Component2/
** nwb.config.js
** package.json

How can I implement CSS modules in this structure? The problem is, style files not exporting to es (build, dist etc.) folder.

1

There are 1 best solutions below

0
On BEST ANSWER

I fixed this issue by editing the build script on package.json.

"scripts": {
    "build": "nwb build-react-component --copy-files"
}