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

vue3-构建build,使用block标签判断,导致模版丢失: Template tmpl_xx_xx not found. #14203

Closed
chenchenpp opened this issue Jul 19, 2023 · 3 comments
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@chenchenpp
Copy link

chenchenpp commented Jul 19, 2023

相关平台

微信小程序

小程序基础库: 2.25.0
使用框架: Vue 3

复现步骤

在页面上使用block标签包裹做v-if判断,发现使用dev构建查看dist构建包,发现是有模版tmpl_xx_xx!但是使用build构建包后,相关tmpl_xx_xx模板丢失;导致页面无法展示。
使用block标签做判断:
image

build后的结果,相关模板丢失:
image
dev后的结果,相关模板还在:
image

期望结果

要么dev和build都不可使用block标签,要么都可以使用,保持一致。

实际结果

dev和build构建结果不一致

环境信息

👽 Taro v3.5.8


  Taro CLI 3.5.8 environment info:
    System:
      OS: macOS 12.5
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 19.3.0 - ~/.nvm/versions/node/v19.3.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v19.3.0/bin/yarn
      npm: 9.2.0 - ~/.nvm/versions/node/v19.3.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.5.8 => 3.5.8 
      @tarojs/components: 3.5.8 => 3.5.8 
      @tarojs/helper: 3.5.8 => 3.5.8 
      @tarojs/mini-runner: 3.5.8 => 3.5.8 
      @tarojs/plugin-framework-vue3: 3.5.8 => 3.5.8 
      @tarojs/plugin-platform-alipay: 3.5.8 => 3.5.8 
      @tarojs/plugin-platform-tt: 3.5.8 => 3.5.8 
      @tarojs/plugin-platform-weapp: 3.5.8 => 3.5.8 
      @tarojs/plugin-vue-devtools: 3.5.8 => 3.5.8 
      @tarojs/runtime: 3.5.8 => 3.5.8 
      @tarojs/shared: 3.5.8 => 3.5.8 
      @tarojs/taro: 3.5.8 => 3.5.8 
      @tarojs/webpack5-runner: 3.5.8 => 3.5.8 
      babel-preset-taro: 3.5.8 => 3.5.8 
      eslint-config-taro: 3.5.8 => 3.5.8 
@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Jul 19, 2023
@chenchenpp
Copy link
Author

补充:还有form,icon标签会有类似问题;还有一点,如果将dist包删掉后,重新构建会此问题必现。

@chenchenpp
Copy link
Author

调试发现,配置开启了缓存机制,cache:{enable:true},如果将其关闭,打包就正常了。或许是此配置有什么问题??

@xuanzebin
Copy link
Member

已知问题,等待 pr 合并:#14117

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

No branches or pull requests

2 participants