From 13b51c7b22779eca47b56052c4a155519ad381d2 Mon Sep 17 00:00:00 2001 From: pengx17 Date: Mon, 27 May 2024 05:22:28 +0000 Subject: [PATCH] build: enable new decorator for swc (#7070) bs now has migrated to stage 3 decorators. to enable running affine locally with debugging blocksuite, we need to [turn this on](https://swc.rs/docs/configuration/compilation#jsctransformdecoratorversion). Question: It seems affine core code already uses stage 3 decorators, however we do not have an issue without this flag since we haven't used class field decorators that uses the `accessor` keyword? --- tools/cli/src/webpack/config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/cli/src/webpack/config.ts b/tools/cli/src/webpack/config.ts index baf25787b..81c7df5a9 100644 --- a/tools/cli/src/webpack/config.ts +++ b/tools/cli/src/webpack/config.ts @@ -273,6 +273,7 @@ export const createConfiguration: ( }, }, useDefineForClassFields: false, + decoratorVersion: '2022-03', }, }, sourceMaps: true,