Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
group-buy-ui
Commits
17ff2add
Commit
17ff2add
authored
Jun 19, 2023
by
徐光星
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/cmdb' into 'master'
feat: 调整sentry配置 See merge request
!18
parents
dfa9fa25
493b4a47
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
15 deletions
+17
-15
.sentryclirc.js
.sentryclirc.js
+2
-1
main.js
src/main.js
+10
-10
vue.config.js
vue.config.js
+5
-4
No files found.
.sentryclirc.js
View file @
17ff2add
const
crypto
=
require
(
'
crypto
'
);
const
crypto
=
require
(
'
crypto
'
);
const
pkgInfo
=
require
(
'
./package.json
'
);
const
pkgInfo
=
require
(
'
./package.json
'
);
const
project
=
pkgInfo
.
name
;
const
project
=
pkgInfo
.
name
;
const
VERSION
=
process
.
env
.
GIT_VERSION
||
'
1.0.0
'
const
hashName
=
crypto
const
hashName
=
crypto
.
createHash
(
'
md5
'
)
.
createHash
(
'
md5
'
)
.
update
(
project
)
.
update
(
project
)
...
@@ -12,7 +13,7 @@ module.exports = {
...
@@ -12,7 +13,7 @@ module.exports = {
project
,
project
,
authToken
:
'
3f1f6f3789594e3a81280c1cd8d4d1008037a7abad714698b60b6f358c3d7562
'
,
authToken
:
'
3f1f6f3789594e3a81280c1cd8d4d1008037a7abad714698b60b6f358c3d7562
'
,
url
:
'
http://newsentry.quantgroups.com
'
,
url
:
'
http://newsentry.quantgroups.com
'
,
release
:
`
${
project
}
@
1.0.0
`
,
release
:
`
${
project
}
@
${
VERSION
}
`
,
ignore
:
[
'
node_modules
'
,
'
tests
'
],
ignore
:
[
'
node_modules
'
,
'
tests
'
],
silent
:
true
,
silent
:
true
,
include
:
[
include
:
[
...
...
src/main.js
View file @
17ff2add
...
@@ -8,18 +8,18 @@ import '@/service/cherryUI.service';
...
@@ -8,18 +8,18 @@ import '@/service/cherryUI.service';
import
'
./style/index.less
'
;
import
'
./style/index.less
'
;
import
saService
from
'
@/service/sa.service
'
;
import
saService
from
'
@/service/sa.service
'
;
import
Bridge
from
'
@qg/js-bridge
'
;
import
Bridge
from
'
@qg/js-bridge
'
;
import
{
init
as
sentryInit
}
from
'
@sentry/vue
'
;
//
import { init as sentryInit } from '@sentry/vue';
import
lazyload
from
'
@qg/cherry-ui/src/lazyload/index
'
;
import
lazyload
from
'
@qg/cherry-ui/src/lazyload/index
'
;
import
'
intersection-observer
'
;
import
'
intersection-observer
'
;
if
(
process
.
env
.
SENTRY_ENV
!==
'
test
'
&&
process
.
env
.
NODE_ENV
===
'
production
'
)
{
// if (process.env.SENTRY_ENV === 'prod
' && process.env.NODE_ENV === 'production') {
sentryInit
({
//
sentryInit({
Vue
,
//
Vue,
dsn
:
'
https://d36508238b7c4e5fa8306948b52948e1@sentry.q-gp.com/11
'
,
// 项目设置中的Client Keys
//
dsn: 'https://d36508238b7c4e5fa8306948b52948e1@sentry.q-gp.com/11', // 项目设置中的Client Keys
release
:
'
group-buy-ui@1.0.0
'
,
// 项目名加版本号
// release: `group-buy-ui@${process.env.GIT_VERSION || '1.0.0'}`
, // 项目名加版本号
tracesSampleRate
:
0.5
,
// 上报频率, 1最大, 0最小, 建议验证设置为1, 项目运行根据情况降低频率
//
tracesSampleRate: 0.5, // 上报频率, 1最大, 0最小, 建议验证设置为1, 项目运行根据情况降低频率
environment
:
process
.
env
.
NODE_ENV
//
environment: process.env.NODE_ENV
});
//
});
}
//
}
Vue
.
prototype
.
util
=
new
Bridge
();
Vue
.
prototype
.
util
=
new
Bridge
();
Vue
.
prototype
.
$track
=
saService
;
Vue
.
prototype
.
$track
=
saService
;
saService
.
init
(
router
);
saService
.
init
(
router
);
...
...
vue.config.js
View file @
17ff2add
...
@@ -3,8 +3,8 @@ const resolve = dir => path.join(__dirname, dir);
...
@@ -3,8 +3,8 @@ const resolve = dir => path.join(__dirname, dir);
const
IS_PROD
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
IS_PROD
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
webpack
=
require
(
'
webpack
'
);
const
webpack
=
require
(
'
webpack
'
);
const
WebpackCosCdnUploadPlugin
=
require
(
'
@qg/webpack-cos-cdn-upload-plugin
'
);
const
WebpackCosCdnUploadPlugin
=
require
(
'
@qg/webpack-cos-cdn-upload-plugin
'
);
const
SentryPlugin
=
require
(
'
@qg/sentry-webpack-plugin
'
);
//
const SentryPlugin = require('@qg/sentry-webpack-plugin');
const
SentryConfig
=
require
(
'
./.sentryclirc
'
);
//
const SentryConfig = require('./.sentryclirc');
// cdn预加载使用
// cdn预加载使用
const
externals
=
{
const
externals
=
{
vue
:
'
Vue
'
,
vue
:
'
Vue
'
,
...
@@ -139,9 +139,10 @@ module.exports = {
...
@@ -139,9 +139,10 @@ module.exports = {
config
.
externals
=
externals
;
config
.
externals
=
externals
;
configObj
=
{
configObj
=
{
plugins
:
[
plugins
:
[
new
SentryPlugin
(
SentryConfig
),
//
new SentryPlugin(SentryConfig),
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
'
process.env.SENTRY_ENV
'
:
`"
${
process
.
env
.
SENTRY_ENV
||
''
}
"`
'
process.env.SENTRY_ENV
'
:
`"
${
process
.
env
.
SENTRY_ENV
||
''
}
"`
,
'
process.env.GIT_VERSION
'
:
`"
${
process
.
env
.
GIT_VERSION
||
''
}
"`
}),
}),
new
WebpackCosCdnUploadPlugin
()
new
WebpackCosCdnUploadPlugin
()
]
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment