简体   繁体   中英

why my scss doesn't working on react project on MacOS

I have successfully installed node-sass for my project but any change on "scss" file is not compiled.

An example: If i change a color on "scss" in browser i see just a color that was before on "scss" file before i have cloned the project.

Note: I did it on old windows laptop and everything works fine but on mac doesn't.

I have tried to rebuild node-sass and reinstal node js but it deosn'work at all.

You app i think is not watching the sass files check the webpack.config.js file and add this property to module property

{
    test: /\.s?css$/,
    use: CSSExtract.extract({
      use: [
        {
          loader: 'css-loader',
          options: {
            sourceMap: true
          }
        },
        {
          loader: 'sass-loader',
          options: {
            sourceMap: true
          }
        }
      ]
    })
  }

see if this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM