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

微信小程序使用WXS,编译后wxs路径不对 #15702

Open
Niubility-SunLight opened this issue May 11, 2024 · 0 comments
Open

微信小程序使用WXS,编译后wxs路径不对 #15702

Niubility-SunLight opened this issue May 11, 2024 · 0 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@Niubility-SunLight
Copy link

Niubility-SunLight commented May 11, 2024

相关平台

微信小程序

复现仓库

https://gitee.com/Niublity/taro-maker.git

分支 wxs_path_error
小程序基础库: 2.25.3
使用框架: React

复现步骤

在src/pages/xxx文件下建立xxx.wxs,打开在config.ts mini中打开半编译模式,并在页面view标签中启用compileMode。

使用Script标签<Script src='./drag.wxs' module='ani'></Script>。源代码路径为./drag.wxs。打包小程序后为

导致找不到wxs文件

微信截图_20240511110229

在源码View标签上使用data-xxx={item.xxx}属性,编译后再wxs获取不到,源码View的data-xxx只支持字符串类型

期望结果

打包后正常使用wxs文件

实际结果

打包后wxs文件路径异常,需要手动修改

环境信息

👽 Taro v3.6.29


  Taro CLI 3.6.29 environment info:
    System:
      OS: Windows 11 10.0.22631
    Binaries:
      Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
      npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 3.6.29 => 3.6.29 
      @tarojs/components: 3.6.29 => 3.6.29 
      @tarojs/helper: 3.6.29 => 3.6.29 
      @tarojs/plugin-framework-react: 3.6.29 => 3.6.29 
      @tarojs/plugin-platform-alipay: 3.6.29 => 3.6.29
      @tarojs/plugin-platform-h5: 3.6.29 => 3.6.29
      @tarojs/plugin-platform-jd: 3.6.29 => 3.6.29
      @tarojs/plugin-platform-qq: 3.6.29 => 3.6.29
      @tarojs/plugin-platform-swan: 3.6.29 => 3.6.29
      @tarojs/plugin-platform-tt: 3.6.29 => 3.6.29
      @tarojs/plugin-platform-weapp: 3.6.29 => 3.6.29
      @tarojs/react: 3.6.29 => 3.6.29
      @tarojs/runtime: 3.6.29 => 3.6.29
      @tarojs/shared: 3.6.29 => 3.6.29
      @tarojs/taro: 3.6.29 => 3.6.29
      @tarojs/taro-loader: 3.6.29 => 3.6.29
      @tarojs/webpack5-runner: 3.6.29 => 3.6.29
      babel-preset-taro: 3.6.29 => 3.6.29
      eslint-config-taro: 3.6.29 => 3.6.29
      react: ^18.0.0 => 18.2.0
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
Status: Todo
Development

No branches or pull requests

1 participant