Commit f2584945 by 张立顺

config:配置sentry

1 parent 400ae7b4
[defaults]
url = 'http://sentry.glsx.com.cn'
org = sentry
project = dj-car-life-system
[auth]
token = 2d992c92b53b40b9869313a353c037d1208ee8bfcc1d418eaec1777f846401b6
auth.token=45d2be625091494b9a0de35af25bb273c0a471650575471096d60dd61f6995e6
defaults.url = http://sentry.glsx.com.cn
defaults.org = sentry
defaults.project =dj-carlife-web
......@@ -48,7 +48,7 @@ if (!isProd) {
process.env.NODE_ENV === 'production' &&
Sentry.init({
Vue,
dsn: 'http://c130dfd99792456ca835ca54680a8bbf@sentry.glsx.com.cn/14',
dsn: 'http://889b61999b9a45448b42f972aa94d11d@sentry.glsx.com.cn/16',
// dsn: 'http://6225fb8e73fb453a8455a9371f3517da@192.168.3.115:9000/4',
integrations: [
new BrowserTracing({
......
......@@ -4,6 +4,7 @@ const forElementUI = require('webpack-theme-color-replacer/forElementUI')
const HardPlugin = require('hard-source-webpack-plugin') // 使用缓存,优化启动速度
// const SpeedMeasurePlugin = require('speed-measure-webpack-plugin')
const SentryWebpackPlugin = require('@sentry/webpack-plugin')
// const CopyDir = require('./plugins/copyDir')
// const AsyncRomveDir = require('./plugins/removeDir')
const { resolve: assets } = require('path')
......@@ -59,6 +60,7 @@ module.exports = {
publicPath, // 根据你的实际情况更改这里
// outputDir: 'copyDirTarget',
lintOnSave: false,
productionSourceMap: true, // 配置SourceMap
devServer: {
// publicPath, // 和 publicPath 保持一致
https: false,
......@@ -122,20 +124,20 @@ module.exports = {
)
config.plugins = [...config.plugins, ...plugins]
// sentry 配置
// process.env.NODE_ENV === 'production' &&
// Object.assign(config, {
// plugins: [
// ...config.plugins,
// new SentryWebpackPlugin({
// // webpack specific configuration
// release: '0.0.1',
// include: './dist', // 需要上传到sentry服务器的资源目录,会自动匹配js 以及map文件
// ignore: ['node_modules', 'vue.config.js'], // 忽略文件目录,当然我们在inlcude中制定了文件路径,这个忽略目录可以不加
// configFile: '.sentryclirc',
// urlPrefix: '~/dj-carlife-web/'
// })
// ]
// })
process.env.NODE_ENV === 'production' &&
Object.assign(config, {
plugins: [
...config.plugins,
new SentryWebpackPlugin({
// webpack specific configuration
release: '0.0.1',
include: './dist', // 需要上传到sentry服务器的资源目录,会自动匹配js 以及map文件
ignore: ['node_modules', 'vue.config.js'], // 忽略文件目录,当然我们在inlcude中制定了文件路径,这个忽略目录可以不加
configFile: '.sentryclirc',
urlPrefix: '~/dj-carlife-web/'
})
]
})
},
// 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js
chainWebpack: config => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!