ef4 / ember-browserify

ember-cli addon for easily loading CommonJS packages from npm via browserify.
MIT License
172 stars 28 forks source link

How to deal with `browser`? #112

Closed henrymazza closed 7 years ago

henrymazza commented 7 years ago

I’m using transliteration with ember-browserify and it is breaking since upgrading to 1.5.x from 1.2.x by loading the bower .js file instead of npm module file. All started happening because the introduced the ‘browser’ entry in package.json as a parallel build routine to build its client-side version.

I’m new to these tools, so this is what I could grap: Browserify uses browser as alternative to main entry when reading package.json. So it’s misleading browserify to load the client-side version which loads a lot of .json files that would require its own pile of hacks to get into my build.

It should be possible to change the main entry point by other means but it looks like you had your own problems with that and ember-cli and non-default main.

It makes me a little lost: is transliteration stepping over browserify’s toe reusing the ‘browser’ attribute; is it something usual? Is it me that am using the wrong tools and don’t know how to config those right? Should transliterate add a index.js at root level just for ember-cli users? That’s too much macroeconomics for me! Give some light!

gabrielgrant commented 7 years ago

I'm not seeing a browser field entry in the current version of https://github.com/andyhu/transliteration/blob/master/package.json ... am I misunderstanding what you're asking?

henrymazza commented 7 years ago

It's fixed. Transliteration had it wrong.