-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
npm run build:h5 -- --watch报错,小程序编译正常 #1356
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
我也是一样编译成H5报错,小程序正常,不知道是什么原因 |
CC @Littly |
检查一下taro-ui是不是v1.5.1? 如果是的话,降级到taro-ui@1.5.0 |
taro-ui降级的时候要注意“^”的使用: "taro-ui": "^1.4.0" 上面这个配置表示安装2.0.0以下的最新版本。如果想要安装固定版本号的依赖,则要去掉前面的“^”: "taro-ui": "1.4.0" |
Hello~ 您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。 如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。 Good luck and happy coding~ |
开发了一个项目,发现taro开发h5存在很大的局限性,比如:taro对h5和小程序的编译存在以下差异:
|
问题描述
执行npm run build:h5 -- --watch报错
复现步骤
[复现问题的步骤]
app.js加上
if (process.env.TARO_ENV === 'weapp') { require('taro-ui/dist/weapp/css/index.css') } else if (process.env.TARO_ENV === 'h5') { require('taro-ui/dist/h5/css/index.css') }
出现编译失败,报错
Module not found: Can't resolve 'taro-ui/dist/h5/css/index.css' in 'e:\xxx\xxx\.temp'
然后删除这段再编译
`Module parse failed: Unexpected token (101:11)
You may need an appropriate loader to handle this file type.
| };
|
|
| `
期望行为
H5编译正常
报错信息
Module not found: Can't resolve 'taro-ui/dist/h5/css/index.css' in 'e:\xxx\xxx\.temp'
`Module parse failed: Unexpected token (101:11)
You may need an appropriate loader to handle this file type.
| };
|
|
| `
系统信息
The text was updated successfully, but these errors were encountered: