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

public文件在根目录下,dist区分版本号打包报错,最简重现 #518

Open
chen900112 opened this issue Dec 18, 2017 · 3 comments

Comments

@chen900112
Copy link

chen900112 commented Dec 18, 2017

重现地址: https://github.com/VanquisherMe/myapp
查找过问题
#30
#341
但为找到解决方式

重现

  1. $ dva new myapp ,获得官方最简 app demo

  2. 在pucblic 下放入一写html 图片 字体库

  3. 修改.roadhogrc.js
    加入https://github.com/VanquisherMe/myapp/blob/master/.roadhogrc.js#L6
    https://github.com/VanquisherMe/myapp/blob/master/.roadhogrc.js#L7
    根据版本号,打包

  4. 执行 npm run build
    image

问题
在移除 上面6、7两行后,使用默认路劲,确实可以打包完成,但是我想输出到版本号文件下就不行
官方文档
我们约定 public 目录下的文件会在 server 和 build 时被自动 copy 到输出目录(默认是 ./dist)下。所以可以在这里存放 favicon, iconfont, html, html 里引用的图片等。

官方说的(默认是 ./dist) 那修改是如何修改 outputPath : ./dist/${version}/ 这样?

@kedoupi
Copy link

kedoupi commented Jan 16, 2018

#464 看看这个,我也遇到这个问题了

@sorrycc
Copy link
Owner

sorrycc commented Jan 17, 2018

roadhog 版本是 1 ?

@kedoupi
Copy link

kedoupi commented Jan 22, 2018

应该是版本2.0

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