实例
export default defineConfig(({ command, mode }) => {
const config: UserConfig = {
plugins: [
command === 'build'
? sentryVitePlugin({
url: 'https://newsentry.qidian.com/',
org: 'yue',
project: 'zhuanti-web',
// Auth tokens can be obtained from https://sentry.io/settings/account/api/auth-tokens/
// and needs the `project:releases` and `org:read` scopes
authToken: SENTRY_AUTH_TOKEN,
release: env?.SENTRY_RELEASE,
include: [
{
paths: ['./dist/server'],
urlPrefix:
mode === 'production'
? join(resolve(__dirname), 'dist/server')
: '/usr/local/trpc/bin/src/packages/m/dist/server',
},
],
})
: null,
command === 'build'
? sentryVitePlugin({
url: 'https://newsentry.qidian.com/',
org: 'yue',
project: 'zhuanti-web',
// Auth tokens can be obtained from https://sentry.io/settings/account/api/auth-tokens/
// and needs the `project:releases` and `org:read` scopes
authToken: SENTRY_AUTH_TOKEN,
release: env?.SENTRY_RELEASE,
include: [
{
paths: ['./dist/client'],
urlPrefix: mode === 'production' ? '~/' : env.VITE_BASE,
},
],
})
: null,
],
}
return config
})