thlorenz / browserify-shim

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

v3.8.9 cannot handle paths #180

Closed daprahamian closed 9 years ago

daprahamian commented 9 years ago

Before 3.8.9, it used to be possible to include a path to a global variable to expose. Example:

"browserify-shim": {
    "Marionette": "window:Backbone.Marionette"
}

It looks like this change in exposify now makes the window lookup look like window["Backbone.Marionette"], which is not the same as window.Backbone.Marionette. Is it possible to fix this to obtain the previous functionality? Thanks!

bendrucker commented 9 years ago

Hmm. That's via https://github.com/bendrucker/globo/pull/2. globo could special-case periods and require that they be escaped if you want it to be a string prop via brackets rather than a dot prop.

bendrucker commented 9 years ago

Do me a favor and file there and I'll take care of this today.