bholloway / resolve-url-loader

Webpack loader that resolves relative paths in url() statements based on the original source file
563 stars 71 forks source link

"WHAT AM I" is printed to the console for each CSS declaration #91

Closed osidenate closed 5 years ago

osidenate commented 5 years ago

This only occurs on the latest version that is published to NPM (2.3.0). It looks like it is fixed in the current codebase, but we need a new version published so that it does not run the log statement.

I get these log statements when I build my project: log statments

I see that this log statement is in resolve-url-loader/index.js in the latest version on NPM (2.3.0): code

bholloway commented 5 years ago

Trying to reproduce I do this

npm info resolve-url-loader

and I get

dist: {
 ...
 tarball: 'https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-2.3.0.tgz',
 ...
},

then I download and extract that .tgz and I get ~/Downloads/package of the release

~/Downloads                                                                                                                                                                                        
▶ grep -nr console package                        
package/lib/find-file.js:151:        console.log(text);

Manually inspecting index.js I don't see the line you quote. Meaning the one causing you the problem.

Can you please perform these steps and see what you get?

osidenate commented 5 years ago

I believe the issue is caused by a bug in my organization's private npm proxy, which was returning an incorrect version of resolve-url-loader when I was requesting 2.3.0.

Thanks for the help debugging.