Skip to content

Commit

Permalink
remove reactstrictmode config
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhravya committed Jun 24, 2023
1 parent 81a50dd commit 68fba8a
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 55 deletions.
103 changes: 51 additions & 52 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,51 @@
/** @type {import('next').NextConfig} */

const withPWA = require("next-pwa");
const HoneybadgerSourceMapPlugin = require("@honeybadger-io/webpack");
const { execSync } = require("child_process");

const {
HONEYBADGER_API_KEY,
NODE_ENV,
} = process.env;

const nextConfig = withPWA({
reactStrictMode: false,
pwa: {
dest: "public",
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === "development",
},
experimental: { images: { allowFutureImage: true } },
env: {
HONEYBADGER_API_KEY
},
webpack: (config, options) => {
// When all the Honeybadger configuration env variables are
// available/configured The Honeybadger webpack plugin gets pushed to the
// webpack plugins to build and upload the source maps to Honeybadger.
// This is an alternative to manually uploading the source maps.
// See https://docs.honeybadger.io/lib/javascript/guides/using-source-maps.html
// Note: This is disabled in development mode.
if (HONEYBADGER_API_KEY && NODE_ENV != "development") {
// `config.devtool` must be 'hidden-source-map' or 'source-map' to properly pass sourcemaps.
// Next.js uses regular `source-map` which doesnt pass its sourcemaps to Webpack.
// https://github.com/vercel/next.js/blob/89ec21ed686dd79a5770b5c669abaff8f55d8fef/packages/next/build/webpack/config/blocks/base.ts#L40
config.devtool = "hidden-source-map";

config.plugins.push(
new HoneybadgerSourceMapPlugin({
apiKey: HONEYBADGER_API_KEY,
assetsUrl:
process.env.NODE_ENV == "development"
? "http://localhost:3000"
: "https://lmfao.tech/_next",
})
);
}

return config;
},
});

module.exports = nextConfig;
/** @type {import('next').NextConfig} */

const withPWA = require("next-pwa");
const HoneybadgerSourceMapPlugin = require("@honeybadger-io/webpack");
const { execSync } = require("child_process");

const {
HONEYBADGER_API_KEY,
NODE_ENV,
} = process.env;

const nextConfig = withPWA({
pwa: {
dest: "public",
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === "development",
},
experimental: { images: { allowFutureImage: true } },
env: {
HONEYBADGER_API_KEY
},
webpack: (config, options) => {
// When all the Honeybadger configuration env variables are
// available/configured The Honeybadger webpack plugin gets pushed to the
// webpack plugins to build and upload the source maps to Honeybadger.
// This is an alternative to manually uploading the source maps.
// See https://docs.honeybadger.io/lib/javascript/guides/using-source-maps.html
// Note: This is disabled in development mode.
if (HONEYBADGER_API_KEY && NODE_ENV != "development") {
// `config.devtool` must be 'hidden-source-map' or 'source-map' to properly pass sourcemaps.
// Next.js uses regular `source-map` which doesnt pass its sourcemaps to Webpack.
// https://github.com/vercel/next.js/blob/89ec21ed686dd79a5770b5c669abaff8f55d8fef/packages/next/build/webpack/config/blocks/base.ts#L40
config.devtool = "hidden-source-map";

config.plugins.push(
new HoneybadgerSourceMapPlugin({
apiKey: HONEYBADGER_API_KEY,
assetsUrl:
process.env.NODE_ENV == "development"
? "http://localhost:3000"
: "https://lmfao.tech/_next",
})
);
}

return config;
},
});

module.exports = nextConfig;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lmfao_tech_frontend",
"version": "0.1.0",
"private": true,
"private": false,
"scripts": {
"dev": "next dev",
"build": "prisma generate --data-proxy && next build",
Expand Down
3 changes: 2 additions & 1 deletion public/sw.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions public/workbox-80ca14c3.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/workbox-80ca14c3.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion public/workbox-df677636.js

This file was deleted.

File renamed without changes.

0 comments on commit 68fba8a

Please sign in to comment.