JetBrains / svg-sprite-loader

Webpack loader for creating SVG sprites.
MIT License
2.01k stars 272 forks source link

fix: Fix DeprecationWarning: Module.issuer: Use new ModuleGraph API #423

Open MalikBen opened 3 years ago

MalikBen commented 3 years ago

What kind of change does this PR introduce? (bugfix, feature, docs update, improvement) Removes warning by using ModuleGraph in case of webpack version >= 5 What is the current behavior? (You can also link to an open issue here) webpack5 build throws a DeprecationWarning [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API See #418 What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change?

Please check if the PR fulfills contributing guidelines

zhongzhong0505 commented 3 years ago

checks failed , @MalikBen

dmnsgn commented 3 years ago

@MalikBen

Looks like test for Env "webpack-2" are failing. Does webpack 2 exports version? If not then can you try changing:

const isWebpackGreaterThan5 = version[0] >= 5;

to

const isWebpackGreaterThan5 = version && version[0] >= 5;
flyyang commented 3 years ago

ping @MalikBen

liuliangsir commented 3 years ago

ping @MalikBen

b-e-r-t-o commented 3 years ago

@pbn04001 can I open a new PR to fix this warning?

d3x42 commented 3 years ago

@b-e-r-t-o Yes, you can

MalikBen commented 1 year ago

Hi, I'm sorry I was receiving all the e-mails in my spam box, is this issue fixed ? Should I close it ?

Eli-Black-Work commented 1 year ago

For what it's worth, I'm no longer seeing this issue. Probably best to wait until a few others weight in before closing it, though, IMHO 🙂

Eli-Black-Work commented 1 year ago

Wait, nvm, I was testing with an outdated version of svg-sprite-loader. Please disregard my answer 🙂