A browserslist config we can use across the org.
npm install -D @qlik/browserslist-config
# or
yarn add -D @qlik/browserslist-config
Then use it in your package.json
"browserslist": [
"extends @qlik/browserslist-config"
]
npx browserslist
When your project has a browserslist config, then webpack will use it. Read more here.
When a user hits code using incompatible browsers, the code will break and a console error saying it threw an exception and a stack of the error can be found.
you can detect supported browsers on client-side by applying browserslist-useragent-regexp and show user friendly information accordingly.
import supportedBrowsers from "./supportedBrowsers.js";
if (!supportedBrowsers.test(navigator.userAgent)) {
// alert("Your browser is not supported.");
}