set output

This commit is contained in:
hbrwang 2020-12-04 13:54:04 +08:00
parent 3deeaf2265
commit e73f4d88ac
2 changed files with 7 additions and 5 deletions

View File

@ -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/...

View File

@ -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