steelbrain / pundle

👾 peaceful bundles - js bundler, built from the ground up for speed and extensibility
358 stars 23 forks source link

File gets imported twice when imported using * as and regular #172

Closed natew closed 6 years ago

natew commented 6 years ago

Doing this seems to instantiate the file twice for me (on master):

# file A
import * as Something from './something'

# file B

import SomethingDefault from './something'

# something.js

console.log('hi twice')
// gets logged out twice

Just documenting to test once ng is usable, referencing this issue in our codebase.

natew commented 6 years ago

Just found the real bug by doing a prod build w webpack!

I imported with capital: OraBannerStore.js when the files is oraBannerStore.js, so seems like pundle resolves it but duplicates.

natew commented 6 years ago

I guess we're using CaseSensitivePaths with webpack so error is:

Module not found: Error: [CaseSensitivePathsPlugin] `/Users/nw/projects/motion/orbit/apps/web/src/stores/OraBannerStore.js` does not match the corresponding path on disk `oraBannerStore.js`