Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use in browser #87

Closed
ddorian opened this issue Apr 30, 2020 · 3 comments
Closed

How to use in browser #87

ddorian opened this issue Apr 30, 2020 · 3 comments

Comments

@ddorian
Copy link

ddorian commented Apr 30, 2020

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

@etienne-martin
Copy link
Owner

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

@Findus23
Copy link

Findus23 commented May 1, 2020

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.

@etienne-martin
Copy link
Owner

etienne-martin commented May 1, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants