Comments (3)
发现由于 <% include common/navbar %>
中引用 img 路径问题导致。
原来的 img 路径引用:
<img class="navbar-logo" src="../../img/logo.svg" alt="imtoken logo" />
修改后的路径:
<img class="navbar-logo" src="../img/logo.svg" alt="imtoken logo" />
奇怪的地方是,如果是路径错误的话,但 index.html 却可以工作。
另外 includes ejs 模板后,有效路径是根据当前 html 页面作为相对路径。
// 如果编译阶段,有对应的报错提示就更好了。
from tmt-workflow.
这里的 include
相当于把代码片段粘贴到对应位置,所以是相对于 父级
的,也就是所存在的 html 页面。
至于图片路径引用错误理论来讲应该是在打开页面运行时才发现,对编译阶段应该是不影响的,可能会有的影响可能是开启了 reversion
功能,需要修改 logo.svg 的名字因为路径错误没找到。
from tmt-workflow.
@littledu 但我奇怪的是,在 index.html 中居然可以工作。
from tmt-workflow.
Related Issues (20)
- 关于目录结构 HOT 2
- px -> rem: 视觉稿默认宽度为什么不是 750px? HOT 2
- 目前微信仍然使用吗 HOT 1
- 适配node 8.0 以上版本 HOT 1
- node-sass error HOT 1
- build-dist reversion 报错 HOT 1
- npm install 报错 HOT 2
- 希望能增加ES6转es5的功能 HOT 1
- 如何将index.html 提到 html 目录之外 HOT 1
- 修复雪碧图一倍的时候,修改html:font-size != 20px,时,雪碧图位置显示不正确。 HOT 4
- 修改项目构建生成时的模板 HOT 1
- 请教下1.5.7中,如果js目录中有插件(含样式图片)的话,dev和dist命令改如何修改? HOT 1
- bem规范介绍应该是--不是__ HOT 1
- npm install 报错 HOT 4
- 可以添加es6解析吗? HOT 1
- TypeError [ERR_INVALID_CALLBACK]: Callback must be a function HOT 3
- gulp build_dist之后样式的二级目录都没有了 HOT 1
- 需要给页面传参,引入了gulp-data这样写结果报错
- 关于BEM规范 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmt-workflow.