From 3030491395123c477403a825e493a119ccd50f37 Mon Sep 17 00:00:00 2001 From: Paul Faure Date: Fri, 13 Mar 2026 23:21:23 -0400 Subject: [PATCH 1/2] fix(idp): disable absolute Babel runtime paths for FreeBSD compatibility babel-preset-react-app defaults to absoluteRuntime: true, which hardcodes Linux-specific absolute paths to @babel/runtime helpers. This breaks builds on FreeBSD. Setting absoluteRuntime: false makes Babel resolve the runtime relative to the source file instead. Fixes: #12065 Co-Authored-By: Claude Opus 4.6 --- changelog/unreleased/fix-idp-babel-freebsd.md | 10 ++++++++++ services/idp/package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/fix-idp-babel-freebsd.md diff --git a/changelog/unreleased/fix-idp-babel-freebsd.md b/changelog/unreleased/fix-idp-babel-freebsd.md new file mode 100644 index 00000000000..c4c7aa18c86 --- /dev/null +++ b/changelog/unreleased/fix-idp-babel-freebsd.md @@ -0,0 +1,10 @@ +Bugfix: Fix IDP build on FreeBSD by disabling absolute Babel runtime + +The `babel-preset-react-app` preset defaults to `absoluteRuntime: true`, +which hardcodes absolute paths to `@babel/runtime` helpers. These paths +fail to resolve on non-Linux platforms like FreeBSD. Setting +`absoluteRuntime: false` makes Babel resolve the runtime relative to +the source file, which works across all platforms. + +https://github.com/owncloud/ocis/pull/XXXX +https://github.com/owncloud/ocis/issues/12065 diff --git a/services/idp/package.json b/services/idp/package.json index 9481cf71160..3ef86fefc59 100644 --- a/services/idp/package.json +++ b/services/idp/package.json @@ -16,7 +16,7 @@ }, "babel": { "presets": [ - "react-app" + ["react-app", { "absoluteRuntime": false }] ] }, "browserslist": { From 0be2bd11aa31b005aaa8a389eba8eaaee27a56c0 Mon Sep 17 00:00:00 2001 From: Paul Faure Date: Fri, 13 Mar 2026 23:21:51 -0400 Subject: [PATCH 2/2] docs: update changelog with PR number Co-Authored-By: Claude Opus 4.6 --- changelog/unreleased/fix-idp-babel-freebsd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/unreleased/fix-idp-babel-freebsd.md b/changelog/unreleased/fix-idp-babel-freebsd.md index c4c7aa18c86..f0e0210d310 100644 --- a/changelog/unreleased/fix-idp-babel-freebsd.md +++ b/changelog/unreleased/fix-idp-babel-freebsd.md @@ -6,5 +6,5 @@ fail to resolve on non-Linux platforms like FreeBSD. Setting `absoluteRuntime: false` makes Babel resolve the runtime relative to the source file, which works across all platforms. -https://github.com/owncloud/ocis/pull/XXXX +https://github.com/owncloud/ocis/pull/12114 https://github.com/owncloud/ocis/issues/12065