Skip to content

Commit

Permalink
feat: добавлен чистый @sentry/nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
mxseev committed Feb 25, 2023
1 parent 605fd7c commit 91ddb44
Show file tree
Hide file tree
Showing 7 changed files with 574 additions and 45 deletions.
18 changes: 16 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
/* eslint-disable @typescript-eslint/no-var-requires */

const {withAxiom} = require("next-axiom")
const withBundleAnalyzer = require("@next/bundle-analyzer")
const bundleAnalyzer = require("@next/bundle-analyzer")
const {withSentryConfig} = require("@sentry/nextjs")

const isDeploy = ["production", "preview"].includes(process.env.VERCEL_ENV)

const sentryWebpackPluginConfig = {
silent: true
}

const bundleAnalyzerConfig = {
enabled: process.env.ANALYZE === "true"
Expand All @@ -19,7 +26,14 @@ const config = {
hostname: "www.freecodecamp.org"
}
]
},
sentry: {
hideSourceMaps: true,
disableServerWebpackPlugin: !isDeploy,
disableClientWebpackPlugin: !isDeploy,
}
}

module.exports = withBundleAnalyzer(bundleAnalyzerConfig)(withAxiom(config))
const withBundleAnalyzer = bundleAnalyzer(bundleAnalyzerConfig)

module.exports = withSentryConfig(withBundleAnalyzer(withAxiom(config)), sentryWebpackPluginConfig)
26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,62 +30,64 @@
"test": "concurrently -c green \"pnpm:test:*\""
},
"dependencies": {
"dotenv": "16.0.3",
"@next/bundle-analyzer": "^13.0.5",
"@next/font": "^13.2.1",
"@sentry/nextjs": "^7.38.0",
"@tanstack/react-query": "^4.16.1",
"@trpc/client": "^10.1.0",
"@trpc/next": "^10.1.0",
"@trpc/react-query": "^10.1.0",
"@trpc/server": "^10.1.0",
"classnames": "2.3.2",
"dotenv": "16.0.3",
"next": "13.2.1",
"next-axiom": "0.17.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"sharp": "^0.31.3",
"zod": "^3.19.1"
},
"devDependencies": {
"@commitlint/cli": "17.4.4",
"@commitlint/config-conventional": "17.4.4",
"@commitlint/lint": "^17.3.0",
"@evilmartians/lefthook": "^1.2.1",
"@types/jest": "29.4.0",
"commitizen": "4.3.0",
"@playwright/test": "1.31.1",
"@testing-library/react": "13.4.0",
"@types/jest": "29.4.0",
"@types/node": "18.11.9",
"@types/react": "18.0.25",
"@typescript-eslint/eslint-plugin": "5.44.0",
"@typescript-eslint/parser": "5.44.0",
"autoprefixer": "10.4.13",
"commitizen": "4.3.0",
"commitlint-plugin-function-rules": "1.7.1",
"concurrently": "7.6.0",
"cssnano": "5.1.14",
"cz-conventional-changelog": "3.3.0",
"eslint": "8.34.0",
"enhanced-resolve": "5.12.0",
"eslint": "8.34.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-airbnb-typescript": "17.0.0",
"eslint-config-next": "13.0.5",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "27.2.1",
"jest": "29.4.3",
"jest-junit": "15.0.0",
"prettier": "2.8.4",
"sort-package-json": "2.4.1",
"ts-jest": "29.0.5",
"ts-node": "10.9.1",
"typescript": "4.9.5",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"jest": "29.4.3",
"jest-environment-jsdom": "29.3.1",
"jest-junit": "15.0.0",
"postcss": "8.4.19",
"postcss-flexbugs-fixes": "5.0.2",
"prettier": "2.8.4",
"sort-package-json": "2.4.1",
"standard-version": "9.5.0",
"tailwindcss": "3.2.4"
"tailwindcss": "3.2.4",
"ts-jest": "29.0.5",
"ts-node": "10.9.1",
"typescript": "4.9.5"
},
"nextBundleAnalysis": {
"budget": 358400,
Expand Down
Loading

0 comments on commit 91ddb44

Please sign in to comment.