Commit 8a3cb748 authored by 郭志伟's avatar 郭志伟

build(vue.config.js): 添加pre环境配置

parent d659b6f9
NODE_ENV=production
VUE_APP_PRE_ENV=pre
\ No newline at end of file
NODE_ENV=production
VUE_APP_PRE_ENV=production
\ No newline at end of file
module.exports = {
extends: ['@commitlint/config-angular'],
};
This diff is collapsed.
......@@ -6,6 +6,7 @@
"serve": "vue-cli-service serve --open",
"report": "vue-cli-service build --report",
"build": "vue-cli-service build",
"build:pre": "vue-cli-service build --mode preproduction",
"lint": "vue-cli-service lint"
},
"dependencies": {
......@@ -18,6 +19,8 @@
"@qg/ui-track-web": "0.0.3",
"core-js": "^3.6.5",
"crypto-js": "^3.1.9-1",
"@commitlint/cli": "^13.2.1",
"@commitlint/config-angular": "^13.2.0",
"intersection-observer": "^0.12.0",
"js-cookie": "^2.2.1",
"qiniu-js": "^3.3.1",
......@@ -52,7 +55,7 @@
"postcss-px2rem": "^0.3.0",
"prettier": "^1.19.1",
"svg-sprite-loader": "^5.2.1",
"vue-template-compiler": "^2.6.11",
"vue-template-compiler": "2.6.11",
"webpack-sentry-plugin": "^2.0.3"
},
"lint-staged": {
......@@ -63,7 +66,8 @@
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
"pre-commit": "lint-staged",
"commit-msg": "commitlint -e $HUSKY_GIT_PARAMS"
}
}
}
/* eslint-disable prettier/prettier */
/* eslint-disable indent */
import production from './prod.config';
import preProduction from './pre-prod.config';
import env from './env.config';
export default process.env.NODE_ENV === 'production' ? production : env;
export default process.env.VUE_APP_PRE_ENV === 'pre'
? preProduction
: process.env.NODE_ENV === 'production'
? production
: env;
const protocol = window.location.protocol;
const talosHost = protocol + '//talos-pre.xyqb.com';
const qiniuHost = protocol + '//kdspstatic.q-gp.com/';
const shenceHost = 'https://bn.xyqb.com/sa?project=production';
const faceHost = 'https://auth-pre.quantgroup.cn';
const VCC_CHANNEL = '';
const TERMINAL = 'H5';
const VERSION = '7.9.00';
const kdspHost = 'https://kdsp-api-pre.q-gp.com';
const opapiHost = `${protocol}//opapi-pre.xyqb.com`;
const localHost = 'https://group-buy-pre.q-gp.com'; // 正式环境页面地址
// const localHost = 'https://group-buy-test1.liangkebang.net'; // 正式环境页面地址
const shenceUrl = protocol + '//bn.xyqb.com/sa?project=production';
const openLink = 'https://mall-pre.q-gp.com';
export default {
openLink,
localHost,
// apiHost,
faceHost,
test: false,
shenceHost,
talosHost,
VCC_CHANNEL,
TERMINAL,
VERSION,
qiniuHost,
kdspHost,
opapiHost,
shenceUrl
};
......@@ -2,8 +2,8 @@ const path = require('path');
const resolve = dir => path.join(__dirname, dir);
const IS_PROD = process.env.NODE_ENV === 'production';
const WebpackCosCdnUploadPlugin = require('@qg/webpack-cos-cdn-upload-plugin');
// const SentryPlugin = require('webpack-sentry-plugin');
// const SentryConfig = require('./.sentryclirc');
const SentryPlugin = require('webpack-sentry-plugin');
const SentryConfig = require('./.sentryclirc');
// cdn预加载使用
const externals = {
vue: 'Vue',
......@@ -127,8 +127,8 @@ module.exports = {
if (IS_PROD) {
config.externals = externals;
configObj = {
// plugins: [new SentryPlugin(SentryConfig), new WebpackCosCdnUploadPlugin()]
plugins: [new WebpackCosCdnUploadPlugin()]
plugins: [new SentryPlugin(SentryConfig), new WebpackCosCdnUploadPlugin()]
// plugins: [new WebpackCosCdnUploadPlugin()]
};
}
return configObj;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment