S
SolidJS2mo ago
Maxx

Reflect.getMetadata('design:paramtypes', target) returns undefined for SolidJS app using Vite

I have an application that makes use of Reflect.getMetadata('design:paramtypes', target) which returns undefined. The same library runs perfectly fine in my React/Vite implementation, but in SolidJS context it is not working. I am using the following Vite config
solidPlugin({
babel: {
plugins: [
'babel-plugin-transform-typescript-metadata',
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
]
}
}),
solidPlugin({
babel: {
plugins: [
'babel-plugin-transform-typescript-metadata',
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
]
}
}),
Interestingly, it works if I request the metadata of a class defined within my entry TS file, but if the class is contained in a separate imported file should it be a sibling to the entry file or in a library then it doesn't work. Does anyone have an idea what I might be missing? I did confirm both my TS config and Vite config as they would most probably have the biggest impact on how decorators define the metadata. experimentalDecorators and emitDecoratorMetadata is set to true
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server