update Next.JS to latest
This commit is contained in:
Vendored
+1
-1
@@ -2,4 +2,4 @@
|
|||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
|
||||||
|
|||||||
+7
-17
@@ -3,19 +3,7 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
|||||||
enabled: process.env.ANALYZE === "true",
|
enabled: process.env.ANALYZE === "true",
|
||||||
});
|
});
|
||||||
|
|
||||||
const sentryWebpackPluginOptions = {
|
const nextConfig = {
|
||||||
// Additional config options for the Sentry Webpack plugin. Keep in mind that
|
|
||||||
// the following options are set automatically, and overriding them is not
|
|
||||||
// recommended:
|
|
||||||
// release, url, org, project, authToken, configFile, stripPrefix,
|
|
||||||
// urlPrefix, include, ignore
|
|
||||||
|
|
||||||
silent: true, // Suppresses all logs
|
|
||||||
// For all available options, see:
|
|
||||||
// https://github.com/getsentry/sentry-webpack-plugin#options.
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = withBundleAnalyzer(withSentryConfig({
|
|
||||||
images: {
|
images: {
|
||||||
domains: [
|
domains: [
|
||||||
"api.sahkoinsinoorikilta.fi",
|
"api.sahkoinsinoorikilta.fi",
|
||||||
@@ -23,7 +11,9 @@ module.exports = withBundleAnalyzer(withSentryConfig({
|
|||||||
"api.dev.sahkoinsinoorikilta.fi",
|
"api.dev.sahkoinsinoorikilta.fi",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
sentry: {
|
};
|
||||||
hideSourceMaps: true, // Hide source maps, see: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#configure-source-maps
|
|
||||||
},
|
module.exports = withBundleAnalyzer(withSentryConfig(nextConfig, {
|
||||||
}, sentryWebpackPluginOptions));
|
silent: !process.env.CI,
|
||||||
|
hideSourceMaps: true, // Hide source maps, see: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#configure-source-maps
|
||||||
|
}));
|
||||||
|
|||||||
Generated
+7488
-2067
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -48,11 +48,11 @@
|
|||||||
"eslint": "^8.13.0",
|
"eslint": "^8.13.0",
|
||||||
"eslint-config-airbnb": "^19.0.4",
|
"eslint-config-airbnb": "^19.0.4",
|
||||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||||
"eslint-config-next": "^13.1.6",
|
"eslint-config-next": "^15.2.5",
|
||||||
"eslint-plugin-import": "^2.26.0",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"husky": "^7.0.4",
|
"husky": "^7.0.4",
|
||||||
"jest": "^27.5.1",
|
"jest": "^27.5.1",
|
||||||
"next-sitemap": "^3.1.11",
|
"next-sitemap": "^4.2.3",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"postcss-jsx": "^0.36.4",
|
"postcss-jsx": "^0.36.4",
|
||||||
"postcss-syntax": "^0.36.2",
|
"postcss-syntax": "^0.36.2",
|
||||||
@@ -64,15 +64,15 @@
|
|||||||
"typescript": "^4.6.3"
|
"typescript": "^4.6.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@next/bundle-analyzer": "^12.2.3",
|
"@next/bundle-analyzer": "^15.2.5",
|
||||||
"@rjsf/core": "^4.2.0",
|
"@rjsf/core": "^4.2.0",
|
||||||
"@sentry/nextjs": "^7.34.0",
|
"@sentry/nextjs": "^9.12.0",
|
||||||
"axios": "^0.26.1",
|
"axios": "^0.26.1",
|
||||||
"date-fns": "^2.28.0",
|
"date-fns": "^2.28.0",
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
"js-cookie": "^3.0.1",
|
"js-cookie": "^3.0.1",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"next": "^13.1.6",
|
"next": "^15.2.5",
|
||||||
"normalize.css": "^8.0.1",
|
"normalize.css": "^8.0.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-csv": "^2.2.2",
|
"react-csv": "^2.2.2",
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// This file configures the initialization of Sentry on the browser.
|
||||||
|
// The config you add here will be used whenever a page is visited.
|
||||||
|
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
||||||
|
|
||||||
|
import * as Sentry from "@sentry/nextjs";
|
||||||
|
|
||||||
|
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;
|
||||||
|
const ENV = process.env.NEXT_PUBLIC_DEPLOY_ENV;
|
||||||
|
|
||||||
|
Sentry.init({
|
||||||
|
dsn: SENTRY_DSN,
|
||||||
|
environment: ENV,
|
||||||
|
// Note: if you want to override the automatic release value, do not set a
|
||||||
|
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
|
||||||
|
// that it will also get attached to your source maps
|
||||||
|
});
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import * as Sentry from "@sentry/nextjs";
|
||||||
|
|
||||||
|
export const onRequestError = Sentry.captureRequestError;
|
||||||
|
|
||||||
|
export async function register() {
|
||||||
|
if (process.env.NEXT_RUNTIME === "nodejs") {
|
||||||
|
await import("../sentry.server.config");
|
||||||
|
}
|
||||||
|
if (process.env.NEXT_RUNTIME === "edge") {
|
||||||
|
await import("../sentry.edge.config");
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
-37
@@ -6,10 +6,7 @@
|
|||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"lib": [
|
"lib": ["dom", "esnext"],
|
||||||
"dom",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
@@ -22,36 +19,17 @@
|
|||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strict": false, // TODO: switch true
|
"strict": false, // TODO: switch true
|
||||||
"target": "esnext",
|
"target": "esnext",
|
||||||
"typeRoots": [
|
"typeRoots": ["types", "node_modules/@types"],
|
||||||
"types",
|
|
||||||
"node_modules/@types"
|
|
||||||
],
|
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@api/*": [
|
"@api/*": ["src/api/*"],
|
||||||
"src/api/*"
|
"@components/*": ["src/components/*"],
|
||||||
],
|
"@hooks/*": ["src/hooks/*"],
|
||||||
"@components/*": [
|
"@models/*": ["src/models/*"],
|
||||||
"src/components/*"
|
"@pages/*": ["src/pages/*"],
|
||||||
],
|
"@theme/*": ["src/theme/*"],
|
||||||
"@hooks/*": [
|
"@views/*": ["src/views/*"],
|
||||||
"src/hooks/*"
|
"@utils/*": ["src/utils/*"]
|
||||||
],
|
|
||||||
"@models/*": [
|
|
||||||
"src/models/*"
|
|
||||||
],
|
|
||||||
"@pages/*": [
|
|
||||||
"src/pages/*"
|
|
||||||
],
|
|
||||||
"@theme/*": [
|
|
||||||
"src/theme/*"
|
|
||||||
],
|
|
||||||
"@views/*": [
|
|
||||||
"src/views/*"
|
|
||||||
],
|
|
||||||
"@utils/*": [
|
|
||||||
"src/utils/*"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"incremental": true
|
"incremental": true
|
||||||
},
|
},
|
||||||
@@ -63,10 +41,9 @@
|
|||||||
"next.config.js",
|
"next.config.js",
|
||||||
"jest.config.js",
|
"jest.config.js",
|
||||||
".eslintrc.js",
|
".eslintrc.js",
|
||||||
"sentry.client.config.js",
|
"sentry.client.config.ts",
|
||||||
"sentry.server.config.js"
|
"sentry.edge.config.ts",
|
||||||
|
"sentry.server.config.ts"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": ["node_modules"]
|
||||||
"node_modules"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user