Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

通过依赖引入样式的问题 #1122

Closed
afc163 opened this issue Dec 30, 2014 · 1 comment
Closed

通过依赖引入样式的问题 #1122

afc163 opened this issue Dec 30, 2014 · 1 comment
Assignees
Labels

Comments

@afc163
Copy link
Member

afc163 commented Dec 30, 2014

alice-step 依赖 alice-iconfont ,配置了 dependencies 后通过 @import 进行引入:

@ import 'alice-iconfont';

启动 spm doc 调试时,访问 http://127.0.0.1:8000/index.css,文件内容如下:

@import "../../alice-iconfont/1.1.0/index.css";
...

这个路径本身就比较奇怪,在本地调试时巧合性地匹配到了 http://127.0.0.1:8000/alice-iconfont/1.1.0/index.css。当 publish 到 spmjs.io 上时,地址变为 http://spmjs.io/docs/alice-iconfont/1.1.0/index.css,这是一个不存在的地址。

http://spmjs.io/docs/alice-step/index.css

正确的最终 css 地址应该是 http://spmjs.io/docs/alice-step/alice-iconfont/1.1.0/index.css 。生成的相对地址应该是:@import "./alice-iconfont/1.1.0/index.css"

@sorrycc
Copy link
Member

sorrycc commented Dec 31, 2014

http://spmjs.io/docs/alice-step/latest/
这个好了。

airyland pushed a commit to MoeKit/serve-spm that referenced this issue Jan 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants