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

直接引用mip2-extentions 编译产出的组件js地址,执行报错 #34

Closed
VenyXiong opened this issue Jul 10, 2018 · 3 comments
Closed
Labels
help wanted Extra attention is needed

Comments

@VenyXiong
Copy link
Member

复现步骤:

  1. 单独部署一个mip2页面的服务, 创建一个页面a.html 地址:127.0.0.1:8080/a.html
  2. mip2-extentions 里执行mip2 dev
  3. 找到测试组件的url地址:127.0.0.1:8111/mip-example/mip-example.js, 写进页面a.html
  4. 预览a.html, 页面报错
    image
@jenkey2011
Copy link
Member

@PengXing
Copy link
Contributor

更新一下 mip2 cli

npm i -g mip2 --registry=http://registry.npm.taobao.org

@PengXing PengXing added the help wanted Extra attention is needed label Jul 10, 2018
@clark-t
Copy link
Contributor

clark-t commented Jul 10, 2018

已修复 请更新至 mip2@1.1.7
如果html服务器和mip-cli起的js服务器不在同一台机器上,请在启动 dev 时指定 --asset 参数,比如:

mip2 dev --asset http://192.168.0.10

这样就可以通过 <script src="http://192.168.0.10:8111/mip-example/mip-example.js"> 引入 js 啦
相关文档清参考:
组件调试

@clark-t clark-t closed this as completed Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants