Electron 打包配置,element-ui图标不显示

在packjson里面配置:

"build": {
		"productName": "henan-tunnel-system",
		"appId": "org.simulatedgreg.electron-vue",
		"directories": {
			"output": "build"
		},
		"files": [
			"dist/electron/" //注意地址的书写,不正确可能会导致elementui图标不能显示
		],
		"dmg": {
			"contents": [
				{
					"x": 410,
					"y": 150,
					"type": "link",
					"path": "/Applications"
				},
				{
					"x": 130,
					"y": 150,
					"type": "file"
				}
			]
		},
		"mac": {
			"icon": "build/icons/icon.icns"
		},
		"win": {
			"icon": "build/icons/icon.ico"
		},
		"linux": {
			"icon": "build/icons"
		},
		"nsis": {
			"oneClick": false,
			"allowElevation": true,
			"allowToChangeInstallationDirectory": true,
			"createDesktopShortcut": true,
			"include": "installer.nsh"
		},
		"asar": false
	},

图标不显示,查看打包之后elementui的路径,有可能是是这里配置的时候地址写错,导致引用出错

你可能感兴趣的:(electron,javascript,前端)