pugjs / pug-loader

Pug loader module for Webpack
MIT License
425 stars 119 forks source link

Please update your npm repos #99

Closed zigang93 closed 6 years ago

zigang93 commented 6 years ago

webapck version: 3.10.0 pug-loader : 2.3.0

Everytime i run 'webpack' to bundle all my code

this message show up: (node:49056) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56 parseQuery() will be replaced with getOptions() in the next major version of loader-utils.

According to this https://github.com/webpack/loader-utils/issues/56

I write process.traceDeprecation = true; in webpack.config.js to figure out which loader make this problem.

it show up is pug-loader cause this warning error.

Error message:

at Object.parseQuery (/Users/Whizet/Desktop/webpack-pug-starter/node_modules/pug-loader/node_modules/loader-utils/index.js:78:3

I think maintainer need to update to fix this issue..

zigang93 commented 6 years ago

I fixed with update package.json "loader-utils": "^1.1.0" and loaderUtils.getLoaderConfig to loaderUtils.getOptions.

weird.. i saw 2.3.0 should already update the code.. but when i npm install .. package.json show 2.3.0 version.

but the code still like old code not latest changes. this version should be fixed. why?

NPM repository not updated? I think the problem mostly is the NPM repository not update!

Update if you dont want to manual change the code, please install github version to fix.

run npm i -D pugjs/pug-loader

your warning message should be gone . thanks