trayio / babel-plugin-webpack-alias

babel 6 plugin which allows to use webpack resolve options
MIT License
150 stars 32 forks source link

Make it work with included files #35

Closed wmertens closed 7 years ago

wmertens commented 8 years ago

My webpack config imports a few things and that seems to trigger the self-loading weirdness; with this patch everything works.

wmertens commented 8 years ago

The failing tests are due to it ignoring conditions the tests test :) No time to amend the tests right now though, sorry.

adriantoine commented 8 years ago

Hi @wmertens, thanks for your contribution! It makes sense but you need to fix the current failing test, which shouldn't be too hard I think, and also, can you please provide a test for that special case you've added?

Thanks! 😊

wmertens commented 7 years ago

@adriantoine done :)

adriantoine commented 7 years ago

Tests are still not passing due to an eslint error, can you add an eslint ignore there? Thanks!

codecov-io commented 7 years ago

Current coverage is 94.38% (diff: 100%)

Merging #35 into master will increase coverage by 0.12%

@@             master        #35   diff @@
==========================================
  Files             1          1          
  Lines            87         89     +2   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits             82         84     +2   
  Misses            5          5          
  Partials          0          0          

Powered by Codecov. Last update 5fb7939...eb931a3

wmertens commented 7 years ago

Hmm odd, the coverage is saying that the return; is not being tested, but isn't that exactly what the added test does? Any ideas?

adriantoine commented 7 years ago

Hi @wmertens, sorry I was busy, I'm having a look now

adriantoine commented 7 years ago

@wmertens I think there's a typo, your config file is called empty-object.js but in the test you're loading empty-object.config.js, I suggest you rename empty-object.js to empty-object.config.js.

wmertens commented 7 years ago

Good catch! I updated it.

adriantoine commented 7 years ago

Cool, thanks! It seems to have fixed the PR validation, not sure why we have several AppVeyor ones 🤔

adriantoine commented 7 years ago

@wmertens Your fix is included in v2.1.2, thanks for your contribution! 🎉