-
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
编译出现 @tarojs/taro/html.css 找不到 taro 版本>=3.4.0 都有该问题,3.3.18没有问题 #11415
Comments
taro-bot2
bot
added
F-react
Framework - React
T-h5
Target - 编译到 H5
V-3
Version - 3.x
labels
Mar 8, 2022
等待热心的小伙伴解决问题中..., 有一些相关的 issues 可能帮助到你!
Thank you so much! |
soeasyjx
changed the title
编译出现 @tarojs/taro/html.css 找不到 taro 版本>=3.4.0 都有问题,3.3.18没有问题
编译出现 @tarojs/taro/html.css 找不到 taro 版本>=3.4.0 都有该问题,3.3.18没有问题
Mar 8, 2022
duplicate #11390 |
@soeasyjx 使用 require 代替 import 引入咯,在 H5 不需要这个样式文件。 if (process.env.TARO_ENV !== 'h5') {
require('@tarojs/taro/html.css')
} |
This was referenced Mar 14, 2022
Closed
This was referenced Mar 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
H5
浏览器版本: Chrome 99.0.4844.51(正式版本) (x86_64)
使用框架: React
复现步骤
安装依赖 cnpm i
运行命令 npm run dev:h5
期望结果
编译正常
实际结果
Failed to compile.
./src/pages/index/index.jsx
Module not found: Can't resolve '@tarojs/taro/html.css' in '/Users/jiangxin/test_project/taro/taro_demo1/src/pages/index'
环境信息
The text was updated successfully, but these errors were encountered: