让ESBuild支持装饰器
npm install esbuild-plugin-typescript-decoratorsemitdecoratormetadata] (https://esbuild.github.io/content-types/#no-type-system) by default.
Reflect.getMetadata ("design: type", target, key), it returns undefined by default. However, using this plugin, it will return the correct value by use the above method
js
import esbuild from 'esbuild'
import { esbuildDecorators } from 'esbuild-plugin-typescript-decorators'
esbuild.build({
// ...config,
plugins: [
esbuildDecorators()
]
})
``