0

I installed sass-loader and I followed all the steps from this article, but still the scss file is not recognized for some reason. Nothing was changed. Could u pls point out to my mistakes.

here u can see my web.config.dev.js file jsFiddle and I did import "./styles/style.scss"; in App.js component

2
  • You attach wrong jsfiddle Commented Oct 28, 2017 at 18:32
  • @SlawaEremkin oh yeah sorry( now it is correct) Commented Oct 28, 2017 at 18:36

1 Answer 1

1

In your jsfiddle you use config for webpack1(article about webpack1 too), so you should use different syntax for including sass support, example of config below:

      {
        test: /\.scss$/,
        include: paths.appSrc,
        use: [
          require.resolve("style-loader"),
          'css-loader',
          {
            loader: require.resolve("postcss-loader"),
            options: {
              ident: "postcss",
              plugins: () => [
                require("postcss-flexbugs-fixes"),
                autoprefixer({
                  browsers: [
                    ">1%",
                    "last 4 versions",
                    "Firefox ESR",
                    "not ie < 9" 
                  ],
                  flexbox: "no-2009"
                })
              ]
            }
          },
          'sass-loader'
        ]
      }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.