Skip to content
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

Loader query is string if style-loader is in loader chain #3136

Closed
farwayer opened this issue Oct 14, 2016 · 5 comments
Closed

Loader query is string if style-loader is in loader chain #3136

farwayer opened this issue Oct 14, 2016 · 5 comments

Comments

@farwayer
Copy link

...
rules: [
      {
        test: /\.css$/,
        use: [
          'style',
          {
            loader: 'css',
            options: {modules: true, localIdentName: '[path][local]'}
          }
        ]
      }

query passed to css-loader will be string instead object.

Bug is in NormalModuleFactory

@andreiglingeanu
Copy link

Is this already fixed by chance? I'm still experiencing it in v2.2.0-rc.1.

@mrkev
Copy link

mrkev commented Feb 26, 2017

Can someone confirm if this has been fixed?

@Jessidhia
Copy link
Member

Jessidhia commented Feb 27, 2017

I'm not sure I understand the whole issue but I believe it's a design issue in the pitching loader API (the API that style-loader uses). In order for the other loaders to still see the file and not just think that everything was handled by style-loader, style-loader needs to inject a loader request that looks like !!css-loader?{"css-loader-options":"here"}!./requested/file, which stringifies the request.

This is not a solution or workaround or anything, but just trying to explain why fixing this would not be easy.

@webpack-bot
Copy link
Contributor

This issue had no activity for at least half a year.

It's subject to automatic issue closing if there is no activity in the next 15 days.

@webpack-bot
Copy link
Contributor

Issue was closed because of inactivity.

If you think this is still a valid issue, please file a new issue with additional information.

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

No branches or pull requests

6 participants