score:0

using import * as styles from './text.module.scss' you are importing the styles as a named export. since this also returns {default: {... my class names} }, you can use styles.default instead, or, perhaps, assign it to a new variable like const style = styles.default

score:0

fixing this issue was by doing import styles from 'path name' and then installing jest-css-modules to map the styles object in my test.

https://www.npmjs.com/package/jest-css-modules

score:0

for me to compile and include with rollup.js the scss into the bundle/build worked adding:

plugins: [
      postcss({
        modules: true,
        extract: false,
        syntax: 'postcss-scss',
        use: ['sass'],
      }),
],

hope this will help someone else in this journey :)


Related Query

More Query from same tag