Skip to content

请问有没有服务或者方法或者当前运行环境、版本号? #2412

Answered by erha19
lovelytan asked this question in Q&A
Discussion options

You must be logged in to vote

@naduohua 如果是前端环境,建议采用下面的方式去判断

@Autowired(AppConfig)
private appConfig: AppConfig;

this.appConfig.isElectronRenderer // 用这个值做判断

Node 进程一般在功能实现上不需要区分。

版本号这块,建议是通过 webpack.DefinePlugin 插件去通过读取依赖的 @opensumi/ide-core-common/pakcage.json 包中的版本号

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lovelytan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants