Add vue.config.js

build options
Move postcss config from package.json to vue.config.js
This commit is contained in:
kPherox 2019-04-06 01:49:31 +09:00
parent 3ec45ab7e9
commit 5ff5038650
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D
2 changed files with 46 additions and 9 deletions

View File

@ -4,7 +4,9 @@
"description": "TheDesk is a Mastodon client for PC.", "description": "TheDesk is a Mastodon client for PC.",
"private": true, "private": true,
"license": "GPL-3.0", "license": "GPL-3.0",
"repository": "https://github.com/kPherox/TheDesk-Vue", "repository": {
"url": "https://github.com/kPherox/TheDesk-Vue"
},
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
@ -47,14 +49,7 @@
"parser": "babel-eslint" "parser": "babel-eslint"
} }
}, },
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [ "browserslist": [
"> 1%", "electron >= 4.0.0"
"last 2 versions",
"not ie <= 8"
] ]
} }

42
vue.config.js Normal file
View File

@ -0,0 +1,42 @@
module.exports = {
css: {
loaderOptions: {
postcss: {
plugins: [
require('autoprefixer')({}),
],
},
},
},
pluginOptions: {
electronBuilder: {
builderOptions: {
productName: "TheDesk Vue",
appId: "dev.kpherox.thedesk-vue",
win: {
"target": [
"nsis",
"portable",
],
},
nsis: {
oneClick: false,
allowToChangeInstallationDirectory: true,
artifactName: "TheDesk-Vue-setup.${ext}",
},
linux: {
target: [
"snap",
],
category: "Network",
},
mac: {
target: [
"dmg",
],
},
},
},
},
}