eggjs / eggjs/egg-ts-helper

对于js文件会使用require引入

Open
#65 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
161
Forks
31
PR merge metrics
No merged PRs in 30d

Description

我的项目是中途换到ts的,所以项目里混合了js和ts,更新到新版本后,对于js导出的controller或service或用`import xx = require(xxx)`引入,但我的js代码里也统一使用了export default,导致获取引入的对象是一个`{ default: [controller|service] }`报错了,这个有办法配置解决吗?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the mixed JavaScript/TypeScript case described in the issue, using a JavaScript default export with TypeScript's `import = require` form. Trace how egg-ts-helper handles the generated import and compare the runtime object with the expected controller or service; done means the default export is resolved correctly or the supported configuration is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.