Closed JamesKyburz closed 10 years ago
When replacing main the recommended approach is to use the string syntax and not the object syntax
"main": "audio.js",
"browser": "./webaudio.js"
However, yes this should still work and is a bug!
I agree, found when trying to browserify level-browserify
Pull request minutes away
On Wednesday 16 April 2014 at 21:07, Roman Shtylman wrote:
When replacing main the recommended approach is to use the string syntax and not the object syntax "main": "audio.js", "browser": "./webaudio.js"
However, yes this should still work and is a bug!
— Reply to this email directly or view it on GitHub (https://github.com/defunctzombie/node-browser-resolve/issues/37#issuecomment-40639307).
If the main entry string and browser source don't match main isn't replaced, even though they are the same relative file.
eg
The problem is index.js#L177
gist show how author can be fooled
Found this issue when attempting to browserify level-browserify