From 5ff5038650148289252d2cfe19375bf460e08a19 Mon Sep 17 00:00:00 2001 From: kPherox Date: Sat, 6 Apr 2019 01:49:31 +0900 Subject: [PATCH] Add vue.config.js build options Move postcss config from package.json to vue.config.js --- package.json | 13 ++++--------- vue.config.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 vue.config.js diff --git a/package.json b/package.json index 5a2eccb7..ddf9f3f8 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "TheDesk is a Mastodon client for PC.", "private": true, "license": "GPL-3.0", - "repository": "https://github.com/kPherox/TheDesk-Vue", + "repository": { + "url": "https://github.com/kPherox/TheDesk-Vue" + }, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", @@ -47,14 +49,7 @@ "parser": "babel-eslint" } }, - "postcss": { - "plugins": { - "autoprefixer": {} - } - }, "browserslist": [ - "> 1%", - "last 2 versions", - "not ie <= 8" + "electron >= 4.0.0" ] } diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 00000000..87001949 --- /dev/null +++ b/vue.config.js @@ -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", + ], + }, + }, + }, + }, +}