From 827098e0d3ed4a5cf3eaa5bf5891accc6203ac14 Mon Sep 17 00:00:00 2001 From: epicexcelsior Date: Tue, 19 May 2026 03:19:16 -0800 Subject: [PATCH] build(babel): enable class static blocks for three.js bundling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit three.js (pulled in by the mesh-map renderer) uses ES2022 class static blocks. babel-preset-expo's default target list doesn't include the transform, so iOS bundling fails with "Static class blocks are not enabled" — Metro returns 500 on every bundle request and the dev-client can't fetch JS at all. No babel.config.js existed; this adds one with preset-expo + the missing plugin. The plugin was already in node_modules transitively (pulled in by @babel/preset-env), so this is config-only — no new dep, no native rebuild. --- mobile_app/babel.config.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 mobile_app/babel.config.js diff --git a/mobile_app/babel.config.js b/mobile_app/babel.config.js new file mode 100644 index 0000000..f3c5f43 --- /dev/null +++ b/mobile_app/babel.config.js @@ -0,0 +1,13 @@ +module.exports = function (api) { + api.cache(true); + return { + presets: ['babel-preset-expo'], + plugins: [ + // three.js (pulled in by the mesh-map renderer) uses ES2022 class + // static blocks. babel-preset-expo's default target list doesn't + // include the transform, so iOS bundling fails with "Static class + // blocks are not enabled" before the dev-client can fetch anything. + '@babel/plugin-transform-class-static-block', + ], + }; +};