rollup/rollup-plugin-node-resolve

Inconsistent module name case results in duplicate imports

jlmakes opened this issue · 1 comments

I have a NPM package tealight (all lowercase) that contains a few utilities. I noticed I mistakenly used a capital "T" when importing the package in one of my files, and instead of failing (because capital letters are invalid in package names), it simply imported the relevant bits of the library a second time.

// module-a.js
import { deepAssign, each } from 'tealight'
// module-b.js
import { each } from 'Tealight' // Oops, capital "T" that's not right!

So I ended up with identical functions each and each$1.

With the latest version, there are 0 identical functions. Can be closed now.

Repro here: #124