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

自动按需引入(unplugin-vue-components),与自定义组合式函数冲突,出现白屏 #2273

Closed
ruixiaozi opened this issue May 6, 2023 · 2 comments
Labels
Need Reproduce 需要提供可复现的代码用于问题排查

Comments

@ruixiaozi
Copy link

NutUI scenes(nutui 场景)

小程序(@nutui/nutui-taro)

NutUI-vue version(nutui-vue 版本)

4.0.6

Vue version(vue 版本)

3.2.44

Operating environment(运行环境)

dev:weapp

Citation method(引用方式)

npm

Node version(node 版本)

16.13.0

Browser and its version(浏览器及其版本)

System and its version(系统及其版本)

win10

Taro environmental information(taro 环境信息)

Taro CLI 3.6.6 environment info:
System:
OS: Windows 10 10.0.22621
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\npm_global\yarn.CMD
npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 3.6.6 => 3.6.6
@tarojs/plugin-platform-qq: 3.6.6 => 3.6.6
@tarojs/plugin-platform-swan: 3.6.6 => 3.6.6
@tarojs/plugin-platform-tt: 3.6.6 => 3.6.6
@tarojs/plugin-platform-weapp: 3.6.6 => 3.6.6
@tarojs/runtime: 3.6.6 => 3.6.6
@tarojs/shared: 3.6.6 => 3.6.6
@tarojs/taro: 3.6.6 => 3.6.6
@tarojs/webpack5-runner: 3.6.6 => 3.6.6
babel-preset-taro: 3.6.6 => 3.6.6
eslint-config-taro: 3.6.6 => 3.6.6

Reproduction link(重现链接)

github.com/jdf2e/nutui/issues

Steps to reproduce(重现步骤)

通过自动按需引入(unplugin-vue-components)的方式,同时页面组件使用<script lang="ts" setup>的方式,在script标签里面Import其他ts的内容。存在多个pages同时引用同一个ts文件时,运行白屏。

What is expected?(期望的结果是什么?)

正常显示

What is actually happening?(实际的结果是什么?)

运行白屏。

@eiinu eiinu added the Need Reproduce 需要提供可复现的代码用于问题排查 label May 6, 2023
@github-actions
Copy link

github-actions bot commented May 6, 2023

你好 @ruixiaozi, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。

@eiinu
Copy link
Member

eiinu commented Jun 20, 2023

unplugin 插件本身的作用是扫描组件代码并添加 import 语句,从原理上看应该不会对其他的代码引用产生影响。
如果仍未解决,建议提供可复现代码仓库。

@eiinu eiinu closed this as completed Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Need Reproduce 需要提供可复现的代码用于问题排查
Projects
None yet
Development

No branches or pull requests

2 participants