etienne-martin/device-detector-js

How to use in browser

ddorian opened this issue · 3 comments

For people that don't know npm/nodejs, how to use/build the package so I can import it as minified in a browser ?

You can try using browserify to create a minified bundle of the package.

Just keep in mind that doing this browser-side means shipping somewhere around 432KB of Regex rules and 144KB of JS (uncompressed and not minified) which doesn't seem user-friendly to people on limited internet connections.

Thank you @Findus23 I updated the README with a disclaimer about that https://github.com/etienne-martin/device-detector-js#browser