Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dynamic static export feature of Next.js #585

Closed
kylemh opened this issue Jun 10, 2019 · 1 comment
Closed

Use dynamic static export feature of Next.js #585

kylemh opened this issue Jun 10, 2019 · 1 comment

Comments

@kylemh
Copy link
Member

kylemh commented Jun 10, 2019

Feature request

@timneutkens reached out about the fact that our app is mostly static and that we can use an experimental feature to really speed things up 🚗💨

Proposed solution

Add the following to next.config.js

// Enable dynamic static exports (if a page can be static, it will be)
experimental: {
  autoExport: true,
},

Remove getInitialProps from _app.js

Move isLoggedIn logic of _app.js formerly within getInitialProps to be a part of componentDidMount(). Go off of client cookie instead of server.

More Context

Read at your leisure:
vercel/next.js#7293

@kylemh
Copy link
Member Author

kylemh commented Jun 11, 2019

Closed in #592

@kylemh kylemh closed this as completed Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants