thlorenz / browserify-shim

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

depends paths are local #231

Closed mparisi76 closed 7 years ago

mparisi76 commented 7 years ago

Hi, I have a simple browserify-shim use case. I'm having an issue with depends. If I have an entry like this:

"browser": {
    "mp_cdc_web_client": "./src/mp_cdc_web_client.js",
    "data_collector_flash": "./src/data_collector_flash.js",
    "data_collector_html": "./src/data_collector_html.js",
    "data_collector_videojs": "./src/data_collector_videojs.js",
    "data_collector_config": "./src/config.js"
  },
"browserify-shim": {
    "data_collector_flash": {
      "exports": "data_collector_flash",
      "depends": [
        "./src/mp_cdc_web_client.js:MP"
      ]
    }
}

my data_collector_flash ends up looking like:

; MP = global.MP = require("/Users/mparisi/Projects/mp-cdc-client/src/mp_cdc_web_client.js"); I've tried using the alias for mp_cdc_web_client instead of the path and that produced the same results. Apologies if this has been answered. I've been trying for a couple hours to find the solution. Any help would be greatly appreciated.

Thank you.

thlorenz commented 7 years ago

That's a question for browserify, please file there.