vercel / next.js

The React Framework
https://nextjs.org
MIT License
125.37k stars 26.77k forks source link

Docs: no explanation of generated files and what the .txt files are for #57419

Open mikehearn opened 11 months ago

mikehearn commented 11 months ago

What is the improvement or update you wish to see?

I generally like to understand what a framework does and how it works up front, before diving in.

I'm using a next.js static site template, so I don't really want to build a full nextjs app. I'm just trying to understand what's going on at a surface level.

Generating the static site server side (output: export) yields the expected pile of js/html/etc files, but also for every page a txt file that appears to contain a set of serialized json objects containing HTML. I've searched in vain to try and understand what these are for, but am left guessing.

It would be good to document what the output artifacts of a nextjs static site are.

Is there any context that might help us understand?

N/A

Does the docs page already exist? Please link to it.

No response

sohaha commented 8 months ago

What is the purpose of the generated txt file?

Can you not generate or remove it?

IggsGrey commented 8 months ago

I have the same issue too.

@sohaha Removing the txt files logs some (minified) errors in the console.

not sure how to reproduce this while running in dev

image

cvipul commented 5 months ago

For a static website, these .txt files are accessible on the internet and I do not wish them to be. PS : Hosting them on S3 with cloudfront

nullCode666 commented 3 months ago

这是一种预取策略 主要是告诉浏览器这个页面需要的一些外部资源 让他提前请求并提前下载 你可以仔细看一下这个页面需要的一些外部资源 对应的.txt文件都有的

AndrewEastwood commented 3 months ago

+1

Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!