Skip to content

Default options should be used if options are not supplied #8

Closed
@ssougnez

Description

@ssougnez

Hi,

I currently have the following configuration:

{
    test: /\.scss$/,
    use: [
        { loader: MiniCssExtractPlugin.loader },
        { loader: "css-loader" },
        { loader: "postcss-loader", options: { parser: 'sugarss' } },
        { loader: "group-css-media-queries-loader" },
        { loader: "sass-loader" }
    ]
}

And when I run webpack", I get the following error:

TypeError: Cannot read property 'sourceMap' of null

I can fix the issue easily like this:

{ loader: "group-css-media-queries-loader", options: { sourceMap: false } }

However, it would be cool to be able not to specify any options, for example, for the people who are using the following syntax:

use: [MiniCssExtractPlugin.loader, "css-loader", "postcss-loader", "group-css-media-queries-loader", "sass-loader"]

Currently, the syntax above is not supported.

Cheers

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