B
B
Bembolat2019-03-14 09:42:08
Sass
Bembolat, 2019-03-14 09:42:08

Webpack doesn't recognize "@import"?

Throws the following error

ERROR in ./src/sass/style.scss 2:0
Module parse failed: Unexpected character '@' (2:0)
You may need an appropriate loader to handle this file type.
| //Основные
> @import "normalize";
| @import "mixins";
| @import "variables";

How to change the config?
{
        test: /\.(sass|scss)$/,
        include: path.resolve(__dirname, 'src/scss'),
        use: ExtractTextPlugin.extract({
          use: [{
              loader: "css-loader",
              options: {
                sourceMap: true,
                minimize: true,
                url: false
              }
            },
            {
              loader: "sass-loader",
              options: {
                sourceMap: true
              }
            }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question