Comments (5)
插件会通过 Taro 提供的插件 API ctx.runOpts.options.platform
获取目前程序是向哪个平台编译的,我搜了下这个 API 是从 Taro 2.2 以后引入的,难道你用的 Taro 比这个版本还低?你的 Taro 版本是多少呢?是否可以提供一个复现问题的 demo?
from mini-program-tailwind.
"@tarojs/taro": "3.4.9" 是仓库提供的 example ,你那边可以跑起来吗,我试了一下改成 ctx.runOpts.platform 似乎就对了
from mini-program-tailwind.
不应该呀,这是我用目前最新的版本 3.4.12
加上 React example 测试的结果
// ctx.runOpts
{
_: [ 'build' ],
options: {
platform: 'weapp',
// ...
},
isHelp: false
}
ctx.runOpts.options.platform
的路径是正确的,开发的时候是基于 3.4.9
测试的,现在是基于 3.4.12
测试的,都没成功复现你说的这个问题。
你是用什么命令运行运行的?有没有可能由于你本地全局的 Taro 版本太旧了?
from mini-program-tailwind.
本地全局 taro 版本是 3.0.23 ,看起来确实是这个导致的 可能文档得更新一下?
from mini-program-tailwind.
请问你将 CLI 版本与项目内的依赖版本对齐后还会出现问题吗?
另外,对于你说的文档要不要更新的问题,其实 Taro 的文档已经提到了该注意事项,如果我在插件的文档里提及可能会有些冗余和重复
from mini-program-tailwind.
Related Issues (20)
- 使用vscode开发没有tailwindcss的代码提示 HOT 1
- windicss 不维护了, 可以支持tailwindcss吗? HOT 2
- 偶现类名失效,app.wxss里没有对应类名 HOT 5
- uniapp vue3 是不是不支持 important w-1/2 的写法啊 HOT 2
- H5打包部署受影响
- 无法编译支付宝小程序
- 开发时启动报错/(ㄒoㄒ)/~~ HOT 1
- 动态属性有时候会没有正确编译 HOT 1
- 在 Taro 下 H5 与小程序端样式大小不一 HOT 2
- Bug: Taro微信小程序,vue3下的transition组件编译失败,附解决方案,望修复
- 微信小程序在js设定px大小时 会出现不生效情况
- supports-[]语法失效
- 暗黑模式 darkmode 无效 HOT 1
- vscode中WindiCSS IntelliSense插件失效
- App平台 v3 模式暂不支持在 js 文件中引用"windi.css" 请改在 style 内引用 HOT 2
- [bug]uni-app vue3 vite下,运行过程中报错
- 最新的tailwind3.x如何配置?请求给个成功示例 HOT 1
- uniapp vue3 vite 运行时正常,发行之后部分windicss的样式失效 HOT 1
- hover-class中的 !类名 不生效 HOT 1
- 使用模板字符串换行后,生成的类名有误导致样式不正确 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mini-program-tailwind.