wnr / element-resize-detector

Optimized cross-browser resize listener for elements.
MIT License
1.32k stars 118 forks source link

requiring source into my own JS (also using browserify) causes "cannot find module error" #48

Closed jsdw closed 8 years ago

jsdw commented 8 years ago

see https://github.com/substack/node-browserify/issues/374

one suggestion was to use "derequire" eg so you'd end up with:

browserify main.js --standalone Foo | derequire > bundle.js

as a note, there is no issue with your minified build (since the "require" function is renamed anyway)

wnr commented 8 years ago

I might misunderstand you, but shouldn't you simply require('element-resize-detector') in your code? This way, you won't use the minified UMD build in dist/.

wnr commented 8 years ago

As I believe this is not an issue with this project, I'll close this issue. Please feel free to reopen if you believe it is.