Skip to content

How is the build optimized with getStaticPaths and getStaticProps? #11052

Closed Answered by Timer
josias-r asked this question in Help
Discussion options

You must be logged in to vote

The code used for getStaticProps / getStaticPaths is always eliminated from the client-side JavaScript files—even in Preview Mode.

This allows you to use Node.js-specific packages, like fs or a direct call to a database, without worrying about client-side size or compatibility.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Timer
Comment options

@josias-r
Comment options

@Timer
Comment options

@Timer
Comment options

@josias-r
Comment options

Answer selected by josias-r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants