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

build: downlevel static class initializer blocks in client output

Co-authored-by: 's avatarNiklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
parent 76e24273
...@@ -39,6 +39,14 @@ module.exports = function (task) { ...@@ -39,6 +39,14 @@ module.exports = function (task) {
}, },
env: { env: {
targets: MODERN_BROWSERSLIST_TARGET, targets: MODERN_BROWSERSLIST_TARGET,
// Always downlevel static class initialization blocks. In loose
// mode SWC lowers static class properties (e.g. `static contextType
// = AppRouterContext`) into a `static { this.contextType = ... }`
// block when the targets support it, and these targets do (baseline
// 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'],
}, },
jsc: { jsc: {
loose: true, loose: true,
......
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