From e73f4d88acf3fc71d894184d42517207ba10e4dc Mon Sep 17 00:00:00 2001 From: hbrwang Date: Fri, 4 Dec 2020 13:54:04 +0800 Subject: [PATCH] set output --- Makefile | 4 ++-- web/vue.config.js | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 2222594b..3e246265 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ build: frps frpc file: rm -rf ./assets/frps/static/* rm -rf ./assets/frpc/static/* - cp -rf ./web/frps/dist/* ./assets/frps/static - cp -rf ./web/frpc/dist/* ./assets/frpc/static + cp -rf ./web/dist/frps/* ./assets/frps/static + cp -rf ./web/dist/frpc/* ./assets/frpc/static rm -rf ./assets/frps/statik rm -rf ./assets/frpc/statik go generate ./assets/... diff --git a/web/vue.config.js b/web/vue.config.js index a43c25ba..b8b8e92f 100644 --- a/web/vue.config.js +++ b/web/vue.config.js @@ -1,11 +1,12 @@ const path = require('path') +const appType = process.env.VUE_APP_TYPE function resolve(dir) { return path.join(__dirname, dir) } function getProxyTargetPort() { - switch (process.env.VUE_APP_TYPE) { + switch (appType) { case 'frps': return 8081 case 'frpc': @@ -17,6 +18,7 @@ function getProxyTargetPort() { module.exports = { publicPath: './', + outputDir: `./dist/${appType}`, devServer: { host: '127.0.0.1', port: 8010, @@ -31,8 +33,8 @@ module.exports = { } }, chainWebpack(config) { - config.plugins.delete('preload') // TODO: need test - config.plugins.delete('prefetch') // TODO: need test + config.plugins.delete('preload') + config.plugins.delete('prefetch') // set svg-sprite-loader config.module