eggjs / eggjs/egg

使用ts时tsconfig.json文件配置module只能使用CommonJS,使用ES会报错

Open
#5,267 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
19k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

### Your detail info about the Bug:

```
{
"extends": "@eggjs/tsconfig",
"compilerOptions": {
"declaration": false,
"paths": {
"@/module/*": ["app/module/*"]
},
"baseUrl": ".",
"noUnusedLocals": false,
"noUnusedParameters": false,
"module": "ES6",
// "moduleResolution": "Node",
// "target": "ES6",
// "esModuleInterop": true
}
}
```
我使用的第三方包node-fetch3只支持es模块化,所以无法使用。

### Reproduction Repo

None

### Node Version

18.16.1

### Eggjs Version

3.15.0

### Plugin Name and its version

"egg-mysql": "^4.0.0", "egg-scripts": "^2.17.0", "egg-tracer": "^2.0.0",

### Platform and its version

win11

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.