-
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
taro3.4 打包h5 引入html5.css报错 #11390
Comments
taro-bot2
bot
added
F-react
Framework - React
T-h5
Target - 编译到 H5
V-3
Version - 3.x
labels
Mar 4, 2022
等待热心的小伙伴解决问题中..., 有一些相关的 issues 可能帮助到你!
Thank you so much! |
This was referenced Mar 8, 2022
@adajoy 使用 require 代替 import 引入咯,在 H5 不需要这个样式文件。我们改一下文档 if (process.env.TARO_ENV !== 'h5') {
require('@tarojs/taro/html5.css')
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
H5
复现仓库
https://github.com/adajoy/taro-h5-build-error
浏览器版本: chrome98
使用框架: React
复现步骤
使用taro3.4初始化项目 在app.ts中import '@tarojs/taro/html5.css' 使用build:h5命令打包
期望结果
打包成功
实际结果
Module not found: Can't resolve '@tarojs/taro/html5.css'
环境信息
The text was updated successfully, but these errors were encountered: