Comments (9)
把路径该成 "../../assets/logo.png" 就可以了
from vue-cli-multi-page.
理论上static里都可以放的,你现在是碰到什么问题呢
from vue-cli-multi-page.
官方的vue-cli是可以直接用'static/img/test.jpg'这种方式引入根目录下的static中文件的,不过我在你的vue-cli-multi-page中好像没办法引入,它会跑到‘src\module\welcome‘里面去找static(我用welcome做的测试)。不知道用什么方式,能给个例子吗
from vue-cli-multi-page.
也遇到同样的问题 发现是路径有误static\img/test.jpg 这个形式
from vue-cli-multi-page.
如果是直接在当前文件夹使用的话,都要先import 才可以使用。
import Banner from './banner.jpg';
from vue-cli-multi-page.
我把图片放在asset下面,但是不管我怎么设置路径,都把/替换成\
发自我的小米手机在 蓝狐 [email protected],2016年9月18日 下午3:02写道:如果是直接在当前文件夹使用的话,都要先import 才可以使用。
//例如
import Banner from './banner.jpg';
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/bluefox1688/vue-cli-multi-page","title":"bluefox1688/vue-cli-multi-page","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/bluefox1688/vue-cli-multi-page"}},"updates":{"snippets":[{"icon":"PERSON","message":"@bluefox1688 in #2: 如果是直接在当前文件夹使用的话,都要先import 才可以使用。\r\n\r\n//例如\r\nimport Banner from './banner.jpg';\r\n
"}],"action":{"name":"View Issue","url":"https://github.com/bluefox1688/vue-cli-multi-page/issues/2#issuecomment-247830236"}}}
from vue-cli-multi-page.
已修复,需要对path.join做下兼容处理,==>path.posix.join
from vue-cli-multi-page.
坑啊。。。。
from vue-cli-multi-page.
现在已经上线2.0,您可以体验试试
from vue-cli-multi-page.
Related Issues (20)
- 能在views 同级目录再创建模块么
- 多页面seo该如何解决? HOT 1
- 编译很慢,不知道从哪开始入手优化? HOT 2
- 公共模块问题
- 使用此项目的多页面商城,打包之后出现webpackJsonp的问题! HOT 1
- views下面的模块的二级目录 是所有模块都必须保持一致吗?
- 打包文件目录配置!
- 请求components文件夹里的公共组件怎么引用图片
- 给变量赋值总是不成功为什么 HOT 3
- 关于开发环境编译后会出现内存过大超出的问题 HOT 4
- 在Lib中使用common中的方法生产环境报不能识别,调试环境无异常
- 修改为history模式,本地测试的页面无法访问 HOT 1
- npm run build --report不会生成带版本的资源文件
- 每次npm run build版本号都会变,怎样做到只有文件改变,版本号才会变?
- npm install直接报错都不能用了
- 可以使用vuex吗? HOT 1
- 请问大家在自己公司的项目中用这个脚手架了吗?
- 请问作者还维护这个项目吗? 肿么这么没有安全感
- dist怎么没有一个根index.html,怎样进行相互的一个跳转呢
- @bluefox1688 被你的脚手架搞死了,大兄弟出来挨打!
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 vue-cli-multi-page.