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

Recognize object array loaders in module.rules.loaders #233

Merged
merged 2 commits into from Aug 13, 2018

Conversation

alexgerv
Copy link
Contributor

When using an object in the webpack modules.rules.loaders array the import would fail silently on this line

function stripQueryParameter(loader) {
const index = loader.indexOf('?');
because theindexOffunction was called on an object.

It will now recursively parse the loaders objects formatted like the following example.

loaders: [{loader: 'style-loader'}]

@codecov
Copy link

codecov bot commented Dec 30, 2017

Codecov Report

Merging #233 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #233   +/-   ##
=======================================
  Coverage   98.04%   98.04%           
=======================================
  Files          29       29           
  Lines         461      461           
=======================================
  Hits          452      452           
  Misses          9        9
Impacted Files Coverage Δ
src/special/webpack.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42ac2b8...d7c5b08. Read the comment docs.

@mnkhouri mnkhouri added this to the 0.6.10 milestone Aug 13, 2018
Copy link
Member

@mnkhouri mnkhouri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉 thank you for the PR @alexgerv! I apologize for the delay in review / merge 😞 we'll get this out in v0.6.10

@mnkhouri mnkhouri merged commit c282200 into depcheck:master Aug 13, 2018
mnkhouri added a commit that referenced this pull request Aug 28, 2018
* master:
  Upgrade all dependencies (#276)
  Fix error when Typescript is not installed (#282)
  Enable ES6/7 syntax in Typescript (#258)
  Update NPM tokens for deploy from Travis (#278)
  Recognize object arrays in Webpack module.rules.loaders (#233)
  Add support for import() expressions (#205)
  Bump Mocha to 5.x (#274)
  Fix ignore-bin-package default in ReadMe (#252)
  Fix typo: pasers -> parsers
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

Successfully merging this pull request may close these issues.

None yet

2 participants