unlock esbuild-loader from ~3.0.0

Description

Summary: Unlock esbuild-loader from ~3.0.0, locked down in STRWEB-94 due to errors building the bundle. 

Details: Some of our code uses an experimental decorator syntax that is incompatible with esbuild (esbuild has long lacked decorator support), so we push it through the TS compiler (STRWEB-78, PR #101), which does handle that experimental syntax, instead. Handling of TS configs changed in esbuild 0.18, which is the cause of our broken builds under esbuild-loader 3.1.0 (STRWEB-94), even though the symptom suggests it's a decorator problem.

IOW, the particular syntax we use in decorators in our interactors is both problematic and slow (esbuild is >50% faster than babel-loader or ts-loader in our experiments).

We can either

  1. sink some time into wrangling this toolchain to see if we can make esbuild happy with our TS config again. This cost will be born by Stripes Force.

  2. refactor away from experimental decorator syntax. This cost will be born by the teams who manage the interactors.

 

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Zak Burke November 8, 2024 at 4:43 AM

esbuild added decorator support in v0.21, and bumping esbuild-loader to ^4.2.2 results in a successful build … that still dies in the browser with a stack trace like

where Home.js:64 is the export class ... line following a bunch of decorators. Ah, so close!

Zak Burke August 28, 2023 at 2:39 PM

, ping. Personally, I think we should refactor our stuff to avoid the experimental decorator syntax so we can push all our non-TS code through the (vastly faster) esbuild pipeline. But as noted in the description, since this is really a TS config problem due to changes in esbuild 0.18, we may need to do (some of) this work anyway, right?

Also note, since this ticket was filed, esbuild has bumped its major again to 0.19. I think we should aim at the newest-available version, if possible.

Zak Burke August 4, 2023 at 3:22 PM

, even if we refactor away from decorators, do we still have to resolve this ticket in order to continue supporting our TS repos?

Done

Details

Assignee

Reporter

Priority

Sprint

Development Team

Stripes Force

Fix versions

Release

Trillium (R2 2025)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created August 1, 2023 at 1:52 PM
Updated March 11, 2025 at 1:54 PM
Resolved March 4, 2025 at 8:13 PM
TestRail: Cases
TestRail: Runs