Debugging Next.js App in Production

Bug(s) in production NextJS app

To Do App
"/": ["static/chunks/pages/index-b1a6b3cf2be8bc12f539.js"]

So there is a hash generated along with the filename, the hash will change whenever we rebuild your application.

Debugging Backend APIs

About Requestly

Solution

Redirect Production JS To Local

Setting up Requestly

Step1 — Install Requestly

Step2 — Setup Redirect Rule

Redirect Rule — Redirect Production API End Point to Local API Endpoint

Now Debugging JS Code on Production

https://sample-nextjs-app-flax.vercel.app/_next/static/chunks/pages/index-b1a6b3cf2be8bc12f539.js

Request URL “WildCard Matches” https://sample-nextjs-app-flax.vercel.app/_next/static/chunks/pages/index-*.js

Destination — https://localhost:3000/_next/static/chunks/pages/index.js

Requestly Redirect Rule (Redirect Production JS to localhost JS)

References —

--

--

--

Setup redirects, modify headers, switch hosts, insert user scripts and much more. Install it on Chrome & Firefox and join our family of more than 100,000 devs!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Top Javascript Frameworks for Web Development in 2021

Basic JavaScript data types and structure you must know.

Understanding Closure through code! (This time for sure)

Using the native form element with React

A Comparison of WebAssembly and JavaScript

Costa Adeje Gran Hotel

Why Factories Classes in JavaScript use JavaScript factories over classes with an example

Advanced React: How to Build User Idle Component using Hooks

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Requestly

Requestly

Setup redirects, modify headers, switch hosts, insert user scripts and much more. Install it on Chrome & Firefox and join our family of more than 100,000 devs!

More from Medium

How to develop a Decentralized Application and Run a Decentralized Startup (DS)!!!

What does ShuttleOne have in store this 2022?

Making a Discord Playlist bot with Serverless Cloud

What is a smart contract development company?