-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
cli3 怎么配置,实现dist下的文件按类型分类保存好 #2225
Comments
同问 |
通过 assetsDir:'static' 可以实现 static/js , static/css ,但 图片不行。求解。 |
static / js and static / css can be achieved by configuring assetsDir:'static', but the picture is still in the dist root directory. |
Closed via 0aebc3a 根本原因是你在 字体文件的生成位置测试下来是正确的,如果默认配置下字体或者图片生成位置不对,请另开一个 issue。 |
@yyx990803 哦,那我就等新版本发布出来在写吧,baseUrl 必须使用相对路径,因为系统都是用在electron或者二级目录下的 |
Btw part of this was caused by a bug in url-loader: webpack-contrib/url-loader#138 Should be fixed when they release a new version. |
目前还是不行呢 |
我也觉得,例如我要放到/www/wwwroot目录下,www上级是根目录,然后vue里我不能设置二级目录的,反正就是不能设置baseUrl,因为根目录名会不停的变,只能用相对目录,似乎一直出错 |
export default new Router({
// mode: 'history',
base: process.env.BASE_URL,
routes: [{
path: '/',
name: 'home',
component: Home
}]
}); |
@ghost meet the same problem |
@ghost 升级到3.0.1版本可以解决 |
Version
3.0.0
Node and OS info
yarn1.7.0/Windows 10
Steps to reproduce
https://github.com/shijunti19/ceshi
What is expected?
我要实现css归类到static/css,js类型到static/js
反正就是按资源分类好!
不然很不舒服!
这个里怎么去配置字体文件什么的,他的后缀名可是有一大堆啊!
我看了下官方文档:注意:生成的 CSS 文件要始终放在输出路径的根部,以确保 CSS 中的 URL 正常工作。
但是我觉得问题不在于它,而在于:css.extract这个功能抽取后他没考虑字体文件路径,这个功能是不完善的!
What is actually happening?
从插件抽取的.woff2,字体文件什么的都没按照要求生成,我也不知道怎么配置了,实在太复杂了!请指导下吧!
dist\static\css\chunk-vendors.css里的8d4a4e6f7431d0d7fa92b1df20f38161.woff2
生成到了dist/8d4a4e6f7431d0d7fa92b1df20f38161.woff2
他的正确位置应该是dist\static\css\8d4a4e6f7431d0d7fa92b1df20f38161.woff2
反正就是css里的引用位置,实际物理地址,全部都是错乱的,我不知道怎么去配置
而且我这个例子里的:mavon-editor组件里的css是相对位置../font/*,这些都要考虑,目前就是错误的!
有没有简单的方法实现按资源分类好!dist下有css,images,font,js
The text was updated successfully, but these errors were encountered: