Relative Content

Tag Archive for next.js

How can I tell Next.js to ignore some files and folders during the build process?

On our Next.js project we have a git submodule that contains UI components shared between multiple projects. Some of the components are not used in my project, and rely on libraries that are not currently installed in my project. To avoid installing these libraries, I’d like to exclude the unneeded components from the build. How can I do that?

Request Header is undefined

I need some help.
I want to get the token from localStorage, but some how it doesn’t work.
It happens when the page moves to dynamic route page.

My video doesn’t come up even though the src is correct in Nextjs13

I’m trying to add a video component to my web app but it never comes up, i make sure i get the src correctly, i even added the video in my app folder and it still doesn’t work heres the code:
<video controls preload="none"> <source src="nature-vid-1.mp4" type="video/mp4" /> </video>

Nextjs Loading Worker was blocked because of a disallowed MIME type (“text/html”)

I have some files inside the path: public/resources that are in .js format. Locally, they are loaded, and I can execute everything as needed. However, when deploying to production, and the application tries to access these files (a third-party SDK), I encounter the following error: Loading Worker from …. was blocked because of a disallowed MIME type (“text/html”).

Next.js logging behaviour in production

I have an issue which I cannot figure out.
I’m using console.log. In production the log works only in top level module, but not inside a function.
In dev it works everywhere.