Skip to content

Commit daa822c

Browse files
authored
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` ```
1 parent c40eb0c commit daa822c

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

packages/next/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
"@next/env": "16.1.0-canary.9",
102102
"@swc/helpers": "0.5.15",
103103
"caniuse-lite": "^1.0.30001579",
104+
"baseline-browser-mapping": "^2.8.3",
104105
"postcss": "8.4.31",
105106
"styled-jsx": "5.1.6"
106107
},

packages/next/src/compiled/browserslist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/next/taskfile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ export async function copy_styled_jsx_assets(task, opts) {
5050
}
5151

5252
const externals = {
53-
// don't bundle caniuse-lite data so users can
53+
// don't bundle caniuse-lite and baseline-browser-mapping data so users can
5454
// update it manually
5555
'caniuse-lite': 'caniuse-lite',
5656
'/caniuse-lite(/.*)/': 'caniuse-lite$1',
57+
'baseline-browser-mapping': 'baseline-browser-mapping',
58+
'/baseline-browser-mapping(/.*)/': 'baseline-browser-mapping$1',
5759

5860
postcss: 'postcss',
5961
// Ensure latest version is used

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)