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

LESS 3.11.0 breaks build importing a file with a webpack resourceQuery #3473

Closed
yellowsunday opened this issue Feb 10, 2020 · 2 comments
Closed

Comments

@yellowsunday
Copy link

Hi, I have a project with a custom webpack loader set up to transform a file before importing it into LESS. This is probably not a very usual setup, but it has worked until now.

Maybe this is related to #3453 somehow?

In the .less file, I'm importing projectColors.json with an additional resourceQuery string:

@import "./projectColors.json?projectcolors";

With 3.11.0 it prints an error that it can't find /path/to/projectColors.json?projectcolors.less

In the webpack config module rules:

    {
      test: /\.json$/,
      resourceQuery: /projectcolors/,
      use: [
        {
          loader: 'text-transform-loader',
          options: {
            transformText: content => {
              // generates and returns LESS content with color variables
            }
          }
        }
      ]
    },

Thanks for looking at this :)

@matthew-dean
Copy link
Member

Please see if this is fixed on 3.11.1

@yellowsunday
Copy link
Author

It is! Thank you for fixing it so quickly :)

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