Unverified Commit 703b71b4 authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

docs: explain static block downleveling as best-effort Safari 15 support

Co-authored-by: 's avatarNiklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
parent f0c18832
...@@ -39,13 +39,10 @@ module.exports = function (task) { ...@@ -39,13 +39,10 @@ module.exports = function (task) {
}, },
env: { env: {
targets: MODERN_BROWSERSLIST_TARGET, targets: MODERN_BROWSERSLIST_TARGET,
// Always downlevel static class initialization blocks. In loose // Support Safari 15 on a best-effort basis: it cannot parse static
// mode SWC lowers static class properties (e.g. `static contextType // class initialization blocks (added in Safari 16.4), so always
// = AppRouterContext`) into a `static { this.contextType = ... }` // downlevel them (`static #_ = this.x = ...`) even though the
// block when the targets support it, and these targets do (baseline // browserslist targets support them.
// since Safari 16.4). The blocks are emitted as
// `static #_ = this.contextType = ...` instead, matching what the
// server build (node 16.8 target) already produces.
include: ['transform-class-static-block'], include: ['transform-class-static-block'],
}, },
jsc: { jsc: {
......
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