Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ssougnez opened this issue Nov 5, 2018 · 4 comments
Closed

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

ssougnez opened this issue Nov 5, 2018 · 4 comments

Comments

@ssougnez
Copy link

ssougnez commented Nov 5, 2018

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

@retyui
Copy link
Owner

retyui commented Nov 5, 2018

Oh, that's a great case. I fixed this problem!

@retyui retyui closed this as completed Nov 5, 2018
@ssougnez
Copy link
Author

ssougnez commented Nov 5, 2018

Man, issues don't stay open very long with you ha ha 👍

@retyui
Copy link
Owner

retyui commented Nov 5, 2018

These problems are not so complicated

@ssougnez
Copy link
Author

ssougnez commented Nov 5, 2018

True.

I just tested it and it works as expected now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants