Node.js · Middle · Question 64 of 75

What does the exports field in package.json do?

Explanation

With exports, import "pkg/internal/x" fails unless that path is listed. It also supports conditions like import, require and types.

Further reading

Problem with a question

Node.js · Middle · question 64

Test yourself

Take the Node.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz