Skip to content

scss module is not working[Bug] #188

@qkreltms

Description

@qkreltms

Describe the bug

I've tried to use scss so followed instruction to use @storybook/preset-scss on documentation and importing scss is working

import React from "react"
// this is working
import "./Button.scss"


const Button = () => (
  <button type="button" className={"simpleButton"}>test2</button>
    )

export default Button

but scss module is not working.

import React from "react"
// This is not working
import styles from "./Button.module.scss"

const Button = () => (
   // styles.simpleButton is undefined
  <button type="button" className={styles.simpleButton}>test2</button>
    )

export default Button

Steps to reproduce the behavior

I implemented an example https://github.com/qkreltms/lerna-test1 (webpack branch)

clone my project and type yarn install to install all packages
and type yarn storybook

Expected behavior

Should scss module is working (in the example button's background must be set pink)

Screenshots and/or logs

11

Environment

  • OS: [win10]
  • Node.js version: [v14.15.3]
  • NPM version: [6.14.11]
  • Yarn version [1.16.0]
  • Browser (if applicable): [chrome]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions