thlorenz / browserify-shim

📩 Makes CommonJS incompatible files browserifyable.
MIT License
933 stars 87 forks source link

Since the last update, my global browserify shims are broken #176

Closed stuff closed 9 years ago

stuff commented 9 years ago

Hi, maybe I'm doing it wrong, but my global shim are declared like that :

"browserify-shim": {
    "Vendors/jQuery": "global:$"
  }

and used in my code like that :

var $ = require('Vendors/jQuery');

I've supposed the shim will override any browserify behavior, so the module name I used (Vendors/jQuery) will never be considered as a path. Until yesterday it was working fine, now the build failed :

Running "browserify:prod" (browserify) task
>> Error: ENOTDIR, stat '/usr/local/bin/node/Vendors/jQuery'

Everything is ok if I change to "jQuery": "global:$" (no / in the module name)

I don't know if it's a very nasty regression or if I misused the function.

seanogdev commented 9 years ago

:thumbsup: getting this too

bendrucker commented 9 years ago

Can you please pin your version so we know exactly where this broke?

stuff commented 9 years ago

it works until 3.8.7 3.8.8 and 3.8.9 are broken for me.

bendrucker commented 9 years ago

Can you create a repro project I can clone and run?

stuff commented 9 years ago

ok

stuff commented 9 years ago

here it is https://github.com/STuFF/browserify-shim-test

bendrucker commented 9 years ago

Believe this should be fixed upstream if you do a fresh install