Skip to content
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

windows下 weapp.compile.exclude 配置排除npm包文件问题 #4775

Closed
deng-yc opened this issue Nov 6, 2019 · 4 comments
Closed

windows下 weapp.compile.exclude 配置排除npm包文件问题 #4775

deng-yc opened this issue Nov 6, 2019 · 4 comments
Assignees

Comments

@deng-yc
Copy link

deng-yc commented Nov 6, 2019

问题描述

在windows下配置 weapp.compile.exclude 忽略npm包中的文件问题

复现步骤
[复现问题的步骤]

  1. 配置 weapp.compile.exclude
weapp:{
    compile: {
        exclude: ['node_modules/tim-wx-sdk/tim-wx.js'],
    },
}

期望行为
期望该文件不被处理直接复制

系统信息

  • 操作系统: Windows 10]
  • Taro 版本 1.3.22
  • Node.js 版本 10.
  • 报错平台 [weapp]

补充信息
cli中 resolve_npm_files.js
image

这里的filePath.indexOf(item),没有处理windows下分隔符

@taro-bot
Copy link

taro-bot bot commented Nov 6, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@deng-yc deng-yc changed the title windows下 weapp.compile.exclude 配置回来npm包文件问题 windows下 weapp.compile.exclude 配置排除npm包文件问题 Nov 6, 2019
@luckyadam
Copy link
Member

tim-wx-sdk
直接配置这个包名吧

@deng-yc
Copy link
Author

deng-yc commented Nov 6, 2019

前面有正则表达式筛选了,直接写tim-wx-sdk是没有作用的 必须是 node_module/tim-wx-sdk

@taro-bot
Copy link

taro-bot bot commented Nov 8, 2019

CC @yuche

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

5 participants