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

关于组件引入方式问题 #506

Closed
lixiang opened this issue May 19, 2018 · 2 comments
Closed

关于组件引入方式问题 #506

lixiang opened this issue May 19, 2018 · 2 comments

Comments

@lixiang
Copy link

lixiang commented May 19, 2018

[问题简单描述]

如果定义了一个组件 组件是以文件夹形式导出 会出现模板找到的情况
比如 新建文件夹 test , 文件夹有test.vue index.js 2个文件 index.js 导出test.vue ,这种方式在其他vue项目是没问题的。
问题复现步骤:

  1. [第一步]
    新建组件文件夹 并用index.js 方式导出
  2. [第二步]
    出现 warning为 Template "index$63a27a96" not found. 情况 组件不会渲染出来
  3. [其他步骤...]

期望的表现:
如果直接import 这个vue 还是可以渲染,是不是考虑文件夹形式导入问题?
[在这里描述期望的表现]

观察到的表现:

[在这里描述观察到的表现]

屏幕截图和动态 GIF 图

![复现步骤的屏幕截图和动态 GIF 图](图片的 url)

@steinslin
Copy link

由于在loader中要静态解析vue文件,所以不支持用js这种来动态抛出组件

@F-loat
Copy link
Contributor

F-loat commented May 19, 2018

这种引用方式在组件生成方面其实是没问题的,但是页面里引用时组件的 name 无法正确识别,做了下简单的修复 mpvue/mpvue-loader#23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants