didi / mpx

Mpx,一款具有优秀开发体验和深度性能优化的增强型跨端小程序框架

Home Page:https://mpxjs.cn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug report] serve web ts报错

forzgc opened this issue · comments

问题描述
使用 mpx-cli-service serve --targets=web 会出现下面几种ts错误,--targets=wx没有这个问题

TS2307: Cannot find module
TS2614: Module '"aaa"' has no exported member 'bbb'
TS7016: Could not find a declaration file for module

环境信息描述
至少包含以下部分:

  1. 系统类型(Windows)
  2. Mpx依赖版本
    "@mpxjs/api-proxy": "^2.9.1",
    "@mpxjs/core": "^2.9.1",
    "@mpxjs/fetch": "^2.9.1",
    "@mpxjs/pinia": "^2.9.1",
    "@mpxjs/store": "^2.9.1",
    "@mpxjs/utils": "^2.9.1",

最简复现demo
mpx-project.zip

执行 yarn serve:web,如果没有出现错误,那么选择一个serve监听到的文件比如 src/pages/index ,按ctrl+s保存两次以上,就会出现错误