Next.js: Expose next/utils

Created on 26 Jan 2017  路  2Comments  路  Source: vercel/next.js

I just saw in your code that you have an utils lib with function loadGetInitialProps. This function is quite useful for end-users too, e.g I needed to make my own (see here). Would it be possible to expose it e.g at 'next/utils'?

Most helpful comment

OK understood 馃憤 This works for now:
import { loadGetInitialProps } from 'next/dist/lib/utils'

All 2 comments

You could always get it from dist. next/dist/utils.

But that's something we are not going to open as a public API.
We might change them at any will or completely remove some of them.
So, it's not safe to open those to public.

OK understood 馃憤 This works for now:
import { loadGetInitialProps } from 'next/dist/lib/utils'

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sospedra picture sospedra  路  3Comments

knipferrc picture knipferrc  路  3Comments

havefive picture havefive  路  3Comments

irrigator picture irrigator  路  3Comments

jesselee34 picture jesselee34  路  3Comments