Skip to content

Doesn't work for scss files #3

Open
@raderj89

Description

@raderj89

Similar problem to #1 but the suggested solution doesn't work for me.

My project uses scss. In my webpack config, I've got:

const path = require('path');

module.exports = {
  // other configs...
  module: {
    rules: [
      {
        test: /\.scss$/,
        use: [
          {
            loader: 'style-loader',
          },
          {
            loader: 'css-loader',
          },
          {
            loader: 'sass-loader',
          },
          {
            loader: 'cssimportant-loader',
          }
        ],
      },
    ],
  },
};

Webpack fails to compile with this error:

ERROR in ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./node_modules/cssimportant-loader!./src/components/index.scss
Module build failed: Error: undefined:24:3: missing '}'

It looks like it's trying to parse the scss and not the compiled css.

I even switched the order of sass-loader and css-loader but that didn't work either.

Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions