Skip to content
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

less 中 变量 无法编译 #11606

Open
myNameCao opened this issue Apr 11, 2022 · 1 comment
Open

less 中 变量 无法编译 #11606

myNameCao opened this issue Apr 11, 2022 · 1 comment
Labels
F-vue2 Framework - Vue 2 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@myNameCao
Copy link

相关平台

微信小程序

复现仓库

https://git.xiaoyanggroup.cn/xycx/front/miniwechat.git
小程序基础库: 2.23.3
使用框架: Vue 2

复现步骤

  @w: 100/1334vw;
  @h: 100/750vh;
  @bg: #0080ff;
  .handleBtn {
    width: 100%;
    height: 78 * @h;
    position: absolute;
    bottom: 5px;
}

期望结果

可以编译

实际结果

无法编译

环境信息

Taro CLI 3.4.4 environment info:
    System:
      OS: macOS 10.14.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 16.14.0 - /usr/local/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 8.5.2 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.4.4 => 3.4.4 
      @tarojs/components: 3.4.4 => 3.4.4 
      @tarojs/mini-runner: ^3.4.4 => 3.4.4 
      @tarojs/runtime: 3.4.4 => 3.4.4 
      @tarojs/taro: 3.4.4 => 3.4.4 
      @tarojs/webpack-runner: 3.4.4 => 3.4.4 
      babel-preset-taro: 3.4.4 => 3.4.4 
      eslint-config-taro: 3.4.4 => 3.4.4 
@taro-bot2 taro-bot2 bot added F-vue2 Framework - Vue 2 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Apr 11, 2022
@FE92star
Copy link
Contributor

FE92star commented Apr 16, 2022

目前taro内部的编译工具,less版本为^4.1.0less-loader版本为7.3.0,这两个包的版本依赖是有问题的,不支持less variables,需要降版本~~~(建议版本——{"less": "^3.0.4", "less-loader": "^5.0.0"})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue2 Framework - Vue 2 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

2 participants