Giter Club home page Giter Club logo

Comments (5)

ItsRyanWu avatar ItsRyanWu commented on May 18, 2024

插件会通过 Taro 提供的插件 API ctx.runOpts.options.platform 获取目前程序是向哪个平台编译的,我搜了下这个 API 是从 Taro 2.2 以后引入的,难道你用的 Taro 比这个版本还低?你的 Taro 版本是多少呢?是否可以提供一个复现问题的 demo?

from mini-program-tailwind.

byteHulk avatar byteHulk commented on May 18, 2024

"@tarojs/taro": "3.4.9" 是仓库提供的 example ,你那边可以跑起来吗,我试了一下改成 ctx.runOpts.platform 似乎就对了

from mini-program-tailwind.

ItsRyanWu avatar ItsRyanWu commented on May 18, 2024

不应该呀,这是我用目前最新的版本 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.

byteHulk avatar byteHulk commented on May 18, 2024

本地全局 taro 版本是 3.0.23 ,看起来确实是这个导致的 可能文档得更新一下?

from mini-program-tailwind.

ItsRyanWu avatar ItsRyanWu commented on May 18, 2024

请问你将 CLI 版本与项目内的依赖版本对齐后还会出现问题吗?
另外,对于你说的文档要不要更新的问题,其实 Taro 的文档已经提到了该注意事项,如果我在插件的文档里提及可能会有些冗余和重复
image

from mini-program-tailwind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.