-
-
Notifications
You must be signed in to change notification settings - Fork 489
Open
Description
Default example:
import Bowser from "bowser";
...
const browser = Bowser.getParser(window.navigator.userAgent);
console.log(`The current browser name is "${browser.getBrowserName()}"`);
// The current browser name is "Chrome"
With tree-shaking:
import { getParser } from "bowser";
const browser = getParser(window.navigator.userAgent);
console.log(`The current browser name is "${browser.getBrowserName()}"`);
Output:
Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/bowser.js?v=8b59587e' does not provide an export named 'getParser'
vite: 2.9.1
bowser: 2.11.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels