browserlist nextjs
Step 1: Open your Next.js project's root directory.
Step 2: Locate the package.json
file in the root directory.
Step 3: Within the package.json
file, find the "browserslist"
key.
Step 4: The value associated with "browserslist"
is a string that defines the target browsers and Node.js versions for your project. Modify this string based on your desired browser support.
Example:
"browserslist": "last 2 versions"
Step 5: Save the package.json
file.
Step 6: This configuration helps tools like Autoprefixer and Babel to determine the range of browser versions and Node.js versions to support.
Step 7: Ensure that the changes are reflected by running your Next.js project and checking for any compatibility issues with the specified browsers.