为什么windows打包出来这么丑?css样式都没了
来源:6-2 添加Electron Builder配置文件

慕前端0194211
2019-07-09
为什么windows打包出来这么丑?css样式都没了。开发的时候都好好的,那个font awsome 字体问题用的是本地的
打包后:
这是开发时的截图:
win打包配置如下(特地安装了electron-buidler-squirrel 组件):
"build": {
"appId": "simpleMusicplayer",
"win": {
"target": ["squirrel","zip"],
"icon": "build/icon.ico"
}
},
试过这个配置也不行,打包出来界面是一样的:
"win": {
"target": [
{
"target": "nsis-web",
"arch": [
"x64",
"ia32"
]
}
],
"icon": "build/icon.ico",
"artifactName": "${productName}-Web-Setup-${version}.${ext}",
"publisherName": "Kandra Labs, Inc."
},
涉及到css文件的地方主要是index.html,内容如下:
<head>
<meta charset="UTF-8">
<title>本地播放器</title>
<link rel="stylesheet" href='../node_modules/bootstrap/dist/css/bootstrap.min.css'>
<link href="./fontawesome-free-5.9.0/css/all.min.css" rel="stylesheet">
<link href="./index.css" rel="stylesheet">
</head>
不知道谁能给解答下
写回答
1回答
-
看起来像是 bootstrap 的文件没有被打包进去,图标还是有的,同学 我给你找个折衷办法,把 bootstrap 那个文件复制出来一份,然后用像其他两个文件一样的路径引用,应该能解决
022019-07-10
相似问题