build: resolve issue with esbuild-plugin-version-injector not working (#9246)

The issue was two-fold.
First of all, tsup starts using swc when `emitDecoratorMetadata` and `@swc/core` is installed.
`@swc/core` is installed transiently, which still causes the problem.
Okay, sure, so we move the `emitDecoratorMetadata` option to just
`packages/builders/tsconfig.json` seeing as the other packages don't use decorators anyway.
But that still leaves solving the issue for builders. @vladfrangu ended
up finding out that there was a bug in how esbuild handles plugins causing
the esbuild-plugin-version-injector plugin to not get loaded. This is solved
in v1.1.0 where the content is also replaced using the `onEnd` hook, if it
wasn't replaced by `onLoad` yet.
This commit is contained in:
Jeroen Claassens
2023-03-19 15:28:06 +01:00
committed by GitHub
parent 98420826bc
commit 2e8e95031c
9 changed files with 17 additions and 17 deletions

View File

@@ -75,7 +75,7 @@
"@types/node": "16.18.13",
"@vitest/coverage-c8": "^0.29.1",
"cross-env": "^7.0.3",
"esbuild-plugin-version-injector": "^1.0.3",
"esbuild-plugin-version-injector": "^1.1.0",
"eslint": "^8.35.0",
"eslint-config-neon": "^0.1.40",
"eslint-formatter-pretty": "^4.1.0",