Issue with parcel-plugin-* and map of requires?

Possibly a 🐛 bug report

I’m testing my plugin to get inlined svgs instead of urls.

🤔 Expected Behavior

screen shot 2018-01-07 at 23 07 10

Below a screenshot of the build file:

screen shot 2018-01-07 at 22 41 29

😯 Current Behavior

screen shot 2018-01-07 at 23 05 37

Below a screenshot of the build file:

screen-shot-2018-01-07-at-22 40 05

💁 Possible cause

I’m asking for help people!

I guess the issue is with the asset ids…

This is kinda random…
Building and building again (eg. just changing the order of the requires) sometimes will not print the duplicate 4 (expected behaviour) but most of the times the requires will have that same numeric require (100%% the number 4 in my example) hence the current behaviour.
Numbers in general are sequential but often not (I don’t know much about that, could you address me somewhere in the code?)
I’d like to start fixing this but I’d like to have a hint from you. Where to start? Is it my plugin? No idea yet. The plugin itself is very basic so far. Nothing fancy really.

💻 Code Sample

https://github.com/albinotonnina/parcel-plugin-inlinesvg/tree/master/example

🌍 Your Environment

Software Version(s)
Parcel any
Node > 8
npm/Yarn both 😛
Operating System osx high sierra

Thanks!

1 possible answer(s) on “Issue with parcel-plugin-* and map of requires?