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
493b4a47
Commit
493b4a47
authored
Jun 16, 2023
by
徐光星
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 调整sentry配置
parent
b5911006
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
main.js
src/main.js
+10
-10
vue.config.js
vue.config.js
+3
-3
No files found.
src/main.js
View file @
493b4a47
...
@@ -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
===
'
prod
'
&&
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@
${
process
.
env
.
GIT_VERSION
||
'
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 @
493b4a47
...
@@ -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,7 +139,7 @@ module.exports = {
...
@@ -139,7 +139,7 @@ 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
||
''
}
"`
'
process.env.GIT_VERSION
'
:
`"
${
process
.
env
.
GIT_VERSION
||
''
}
"`
...
...
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