'show an error message if browser is not supported
In my Vue.js app, I have the following in package.json
"browserslist": [
"> 1%",
"last 2 versions"
]
I believe this is used by Babel to customise the JavaScript that is generated (other build tools may also use it). Is it possible for me to leverage this list of supported browsers to show an error if the user attempts to load the app in an unsupported browser?
I could write some JavaScript that detects the user agent and shows an error if the browser is not supported, but this would likely require me to maintain the list of supported browsers in 2 places, which I'd rather avoid.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
