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

How to support 'multiple files' #2

Open
damiensawyer opened this issue Jul 2, 2024 · 0 comments
Open

How to support 'multiple files' #2

damiensawyer opened this issue Jul 2, 2024 · 0 comments

Comments

@damiensawyer
Copy link

Thank you for a brilliant article and example. It was really helpful.

I'm wondering if I can bother you with a quesiton.

You have your shared code in a single index.ts file. You then export "./build/index.js" as "main" in package.json. This makes it easy to import.

How would you handle a second file alongside index.ts? Say maths.ts with a single function it it. I've been playing around with it for a while but cannot seem to be able to import it without something like

import { Add } from "@monorepo/utils/build/maths"

It seems 'wrong to me to have to refer to the build folder in that from statement.

Is there some way around this?

Thank you for any help!!

DS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant