Skip to content

Understanding why foo is mapped to foo/src in the nextjs branch #313

@PaulRBerg

Description

@PaulRBerg

I was looking at the nextjs branch, specifically at the tsconfig.json file in packages/nextjs:

"paths": {
"foo": ["foo/src"],
"components": ["components/src"]
},

And I'm trying to understand why you have remapped foo to foo/src, and components to components/src. Shouldn't these packages be built and loaded from dist? Or did you have to do this because Next.js doesn't support TypeScript project references?

I also don't understand how the external dependencies of foo and components are resolved when building the Next.js app. Does this rely upon node_modules being hoisted at the root?

Side note: would you like to enable GitHub Discussions in this repository? I would have created a discussion instead of a repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions