8000 小程序插件模式下项目中的 tsconfig.json配置不生效 · Issue #1976 · didi/mpx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

小程序插件模式下项目中的 tsconfig.json配置不生效 #1976

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

Open
ghost0ye opened this issue Apr 27, 2025 · 2 comments
Open

小程序插件模式下项目中的 tsconfig.json配置不生效 #1976

ghost0ye opened this issue Apr 27, 2025 · 2 comments

Comments

@ghost0ye
Copy link
ghost0ye commented Apr 27, 2025

source.zip

问题描述
请用简洁的语言描述你遇到的bug,至少包括以下部分,如提供截图请尽量完整:

  1. 问题触发的条件
  2. 期望的表现
  3. 实际的表现

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

  1. 系统类型(Mac)
  2. Mpx依赖版本 @latest

最简复现demo
使用最新版cli 执行 mpx create mpx-project

请选择小程序项目所属平台(目前仅微信下支持跨平台输出) wx
是否需要跨小程序平台 No
是否需要使用小程序云开发能力 No
是否是个插件项目?(不清楚请选 No !什么是插件项目请看微信官方文档!) Yes
是否需要typescript Yes
项目描述 A mpx project
请输入小程序的Appid touristappid

引入一个 test.ts 文件, 使用上 any声明, Tsconfig.json里 禁用下 报错,noImplicitAny: true 无效

@ghost0ye
Copy link
Author

补充一下, tsconfig.json无效跟 是不是 小程序插件项目无关, 测试发现

使用最新版cli 执行 mpx create mpx-project

请选择小程序项目所属平台(目前仅微信下支持跨平台输出) wx
是否需要跨小程序平台 No
是否需要使用小程序云开发能力 No
是否是个插件项目?(不清楚请选 No !什么是插件项目请看微信官方文档!) No
是否需要typescript Yes
项目描述 A mpx project
请输入小程序的Appid touristappid

这么初始化的项目,根目录的 tsconfig.json配置 依然无效

@mater1996
Copy link
Collaborator

https://www.typescriptlang.org/tsconfig/#noImplicitAny
按照这里的示例测试了下没问题,辛苦确认下修改配置后是否重启tsServer,以及截一下有问题的图吧。

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
0