打包调整
This commit is contained in:
parent
a86509d7d3
commit
e2480e28dc
@ -1,5 +1,6 @@
|
||||
# just a flag
|
||||
NODE_ENV = 'local-test'
|
||||
NODE_ENV = 'test'
|
||||
VUE_APP_PRO = 'local-test'
|
||||
|
||||
# base api
|
||||
# VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'
|
||||
|
@ -6,11 +6,11 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "vue-cli-service serve --open",
|
||||
"dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
|
||||
"dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
|
||||
"build": "vue-cli-service build --mode production",
|
||||
"test": "vue-cli-service build --mode staging",
|
||||
"local": "vue-cli-service build --mode",
|
||||
"buildas": "node --max-old-space-size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js build --mode",
|
||||
"buildas": "vue-cli-service build --mode",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||
|
@ -40,16 +40,16 @@ export function handlerUrl(data) {
|
||||
VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';
|
||||
UPLOAD_API = 'http://joylink.club/jlfile';
|
||||
BASE_SITE = 'https://test.joylink.club/cbtc';
|
||||
} else if (process.env.NODE_ENV === 'test' && process.env.VUE_APP_PRO === 'local-test') {
|
||||
BASE_API = 'https://192.168.3.233/rtss-server';
|
||||
VOICE_API = 'https://192.168.3.233/oss/joylink';
|
||||
UPLOAD_API = 'https://192.168.3.233';
|
||||
BASE_SITE = '/cbtc';
|
||||
} else if (process.env.NODE_ENV === 'test') {
|
||||
BASE_API = data && data.domainName ? 'https://' + data.domainName : 'https://test.joylink.club/jlcloud';
|
||||
VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';
|
||||
UPLOAD_API = 'http://joylink.club/jlfile';
|
||||
BASE_SITE = 'https://test.joylink.club/cbtc';
|
||||
} else if (process.env.NODE_ENV === 'local-test') {
|
||||
BASE_API = 'https://192.168.3.233/rtss-server';
|
||||
VOICE_API = 'https://192.168.3.233/oss/joylink';
|
||||
UPLOAD_API = 'https://192.168.3.233';
|
||||
BASE_SITE = '/cbtc';
|
||||
} else if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_PRO === 'local') {
|
||||
BASE_API = 'http://160.20.60.15:9000';
|
||||
VOICE_API = 'http://160.20.60.15/oss/joylink';
|
||||
|
@ -19,7 +19,6 @@ let outputDir = '';
|
||||
outputDir = process.env.VUE_APP_PRO == 'local' || process.env.VUE_APP_PRO == 'ntyl' ? 'dist' : 'dist/cbtc';
|
||||
})();
|
||||
|
||||
|
||||
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
||||
module.exports = {
|
||||
/**
|
||||
@ -33,7 +32,7 @@ module.exports = {
|
||||
outputDir: outputDir,
|
||||
assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录
|
||||
lintOnSave: false,
|
||||
productionSourceMap: false,
|
||||
productionSourceMap: false,
|
||||
devServer: {
|
||||
port: port,
|
||||
host: '0.0.0.0',
|
||||
@ -73,7 +72,7 @@ module.exports = {
|
||||
// })
|
||||
// );
|
||||
if (process.env.NODE_ENV != 'development') {
|
||||
config.mode = 'production';
|
||||
config.mode = 'production';
|
||||
|
||||
Object.assign(config, {
|
||||
output:{
|
||||
@ -84,8 +83,8 @@ module.exports = {
|
||||
});
|
||||
} else {
|
||||
// 为开发环境修改配置...
|
||||
config.mode = 'development';
|
||||
config.name = name;
|
||||
config.mode = 'development';
|
||||
config.name = name;
|
||||
}
|
||||
|
||||
config.resolve = {
|
||||
|
Loading…
Reference in New Issue
Block a user