Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在vite创建出来的项目中使用Autowired异常 #122

Closed
lixin131 opened this issue Feb 29, 2024 · 4 comments
Closed

在vite创建出来的项目中使用Autowired异常 #122

lixin131 opened this issue Feb 29, 2024 · 4 comments

Comments

@lixin131
Copy link

在vite 5 创建的环境中使用 2.1.0版本,使用Autowired的代码截图如下

1

但是从容器中获取SplitPanelManager实例的时候,实例属性injector为undefined,而有效值则在SplitPanelManager类的原型上。打印对象截图如下

2

删除实例属性Injector才能访问到注入的对象,因自身技术差找不出问题出在哪里,该怎样操作才能解决问题。

@bytemain
Copy link
Member

感谢反馈,vite5+typescript5 复现了这个问题,我来看一下:
CleanShot 2024-02-29 at 16 28 29@2x

@bytemain
Copy link
Member

bytemain commented Mar 8, 2024

we will provide a new version that support the new es decorator.

@lixin131
Copy link
Author

非常谢谢,通过修改tsconfig.json能解决问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants