taro 使用 babel-plugin-react-css-modules 处理css modules 运行小程序,发现dom上没有class属性

bksxznpy  于 2022-11-02  发布在  Babel
关注(0)|答案(2)|浏览(111)

相关平台

微信小程序

小程序基础库: 2.25.2
使用框架: React

复现步骤

小程序 taro react 3.3.9升级3.5.1

期望结果

babel-plugin-react-css-modules 处理css modules 正常使用

实际结果

运行项目发现没有样式

环境信息

👽 Taro v3.5.1

  Taro CLI 3.5.1 environment info:
    System:
      OS: macOS 12.5
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 14.19.0 - ~/.nvm/versions/node/v14.19.0/bin/node
      Yarn: 1.22.17 - /usr/local/bin/yarn
      npm: 6.14.16 - ~/.nvm/versions/node/v14.19.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.5.1 => 3.5.1
      @tarojs/components: ^3.5.1 => 3.5.3
      @tarojs/plugin-framework-react: ^3.5.1 => 3.5.3
      @tarojs/plugin-platform-weapp: ^3.5.1 => 3.5.3
      @tarojs/react: ^3.5.1 => 3.5.3
      @tarojs/router: ^3.5.1 => 3.5.3
      @tarojs/runtime: ^3.5.1 => 3.5.3
      @tarojs/taro: 3.5.1 => 3.5.1
      @tarojs/taro-h5: ^3.3.9 => 3.5.3
      babel-preset-taro: ^3.3.9 => 3.5.3
      eslint-config-taro: ^3.3.9 => 3.5.3
      eslint-plugin-taro: ^3.3.9 => 3.3.20
      nerv-devtools: ^1.5.7 => 1.5.7
      nervjs: ^1.5.7 => 1.5.7
      react: ^17.0.2 => 17.0.2
    npmGlobalPackages:
      typescript: 4.7.4

补充信息

审查元素发现dom上没有class属性。导致没有样式

ws51t4hk

ws51t4hk1#

这个问题什么时候能给解决呢? 不然没法升级taro3.5以上版本了

tzcvj98z

tzcvj98z2#

@cookie-zhang 麻烦提供一下demo哈

相关问题