Skip to content

Replace parseQuery() with getOptions() #29

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
bstuff opened this issue Mar 12, 2017 · 1 comment
Closed

Replace parseQuery() with getOptions() #29

bstuff opened this issue Mar 12, 2017 · 1 comment

Comments

@bstuff
Copy link

bstuff commented Mar 12, 2017

I use webpack2.

module: {
    loaders: [
...
        test:   /\.(pug|jade)$/,
        loaders: [
          {
            loader: 'html-loader',
            options: {
              interpolate: true,
              attrs: 'img:src xlink:href source:src image:xlink:href',
            },
          },
          {
            loader: 'pug-html-loader',
            options: {
              exports: false,
              basedir: __dirname,
            },
          },
        ],
...
  ],
},

causes (node:91943) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see webpack/loader-utils#56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.

while

module: {
    loaders: [
...
        test:   /\.(pug|jade)$/,
        loaders: [
          'html?attrs=img:src xlink:href source:src image:xlink:href&interpolate',
          'pug-html?exports=false&basedir='+__dirname,
        ],
...
  ],
},

is ok

@willyelm
Copy link
Owner

warning should be gone on the latest version

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