brunch / deppack

Extract node modules to browser.
MIT License
4 stars 13 forks source link

VUE_ENV not being shimmed on Windows #44

Open nblackburn opened 7 years ago

nblackburn commented 7 years ago

I am having an issue which seems to be exclusive to Windows where process.env.VUE_ENV is not getting shimmed but works fine on Mac and Linux.

It seems to be discrepancy in Windows as the process object doesn't show up as it does in other platforms.

Some more details on the issue can be found here: https://github.com/nblackburn/vue-brunch/issues/4#issuecomment-248772655

JohnnyCrazy commented 7 years ago

Already posted the reason on the linked issue, here is a summary:

The problem is here(1) and here(2)

So this is how process looks like in (1):

...
process: 'e:\\Programmierung\\Projekte\\odin\\node_modules\\process\\browser.js'
...

And this is how isFileShim gets it in (2):

'e:/Programmierung/Projekte/odin/node_modules/process/browser.js'

So basically it doesn't get recognized as shim because node-browser-modules adds \\ while deppack uses a single /.

nblackburn commented 7 years ago

@goshakkk @paulmillr Are you guys around to take a look at this?