| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
I created from scratch a monorepo using npm workspaces containing: @my/ui a simple vanilla TS, vite-compiled module @my/wrapper a simple vanilla TS module, also vite-compiled, depending on @my/ui my-application a simple angular application, utilizing @my/wrapper
I declared a type on @my/ui called ThingType that is the input type for the function wrapThing, declared in @my/wrapper
I proceeded then to import this wrapper function in my-application -- that has a dependency on @my/wrapper but not on @my/ui
Results:
The setup works on both node 20 and node 18
I developed the example further along by creating two layers of type validation:
I think this addresses all the constraints we have on the way the monorepo is supposed to behave, and it even solves the type export issue by separating IDE issues from build issues.
| Back | FazBrowse Home | New Git URL |