Skip to content
Discussion options

You must be logged in to vote

No—they are not safe to use, anything you import from dist/... is considered private and may break or change at any time.

You can read from the router object instead:

import { useRouter } from 'next/router';

const { basePath } = useRouter();

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@WickyNilliams
Comment options

@WickyNilliams
Comment options

Answer selected by WickyNilliams
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