Unverified Commit daa822c5 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Match behavior of baseline-browser-mapping with caniuse-lite (#86653)

## What?

Similar to `caniuse-lite` there's a new package in `browserslist` that
also has "data is outdated" message. In order to handle it in the same
way as `caniuse-lite` I've marked it external and added it as a
dependency of Next.js when installing.

I'm still not happy about this. This log is not super helpful and would
preferably be disabled. Alternatively we can switch to loading
browserslist using the rust-side browserslist implementation.

Warning message:

```
[baseline-browser-mapping] The data in this module is over two months old.  To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
```
parent c40eb0c1
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
"@next/env": "16.1.0-canary.9", "@next/env": "16.1.0-canary.9",
"@swc/helpers": "0.5.15", "@swc/helpers": "0.5.15",
"caniuse-lite": "^1.0.30001579", "caniuse-lite": "^1.0.30001579",
"baseline-browser-mapping": "^2.8.3",
"postcss": "8.4.31", "postcss": "8.4.31",
"styled-jsx": "5.1.6" "styled-jsx": "5.1.6"
}, },
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -50,10 +50,12 @@ export async function copy_styled_jsx_assets(task, opts) { ...@@ -50,10 +50,12 @@ export async function copy_styled_jsx_assets(task, opts) {
} }
const externals = { const externals = {
// don't bundle caniuse-lite data so users can // don't bundle caniuse-lite and baseline-browser-mapping data so users can
// update it manually // update it manually
'caniuse-lite': 'caniuse-lite', 'caniuse-lite': 'caniuse-lite',
'/caniuse-lite(/.*)/': 'caniuse-lite$1', '/caniuse-lite(/.*)/': 'caniuse-lite$1',
'baseline-browser-mapping': 'baseline-browser-mapping',
'/baseline-browser-mapping(/.*)/': 'baseline-browser-mapping$1',
postcss: 'postcss', postcss: 'postcss',
// Ensure latest version is used // Ensure latest version is used
......
...@@ -1081,6 +1081,9 @@ importers: ...@@ -1081,6 +1081,9 @@ importers:
'@swc/helpers': '@swc/helpers':
specifier: 0.5.15 specifier: 0.5.15
version: 0.5.15 version: 0.5.15
baseline-browser-mapping:
specifier: ^2.8.3
version: 2.8.32
caniuse-lite: caniuse-lite:
specifier: 1.0.30001746 specifier: 1.0.30001746
version: 1.0.30001746 version: 1.0.30001746
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment