Getting Multiple Entry Points to Work in pnpm workspace #1074
Unanswered
thedanchez
asked this question in
Q&A
Replies: 1 comment
-
|
Hey @thedanchez 👋 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a question on generating multiple entry points for my library using
tsupas I'm having trouble getting them to work. My intent is to have the following type of importsTo achieve this, I am doing the following in my
tsup.config.tsAnd in my
package.jsonI have the followingexportsconfiguration:{ "name": "@org/myLib", "version": "0.16.10", "description": "...", "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.js", "browser": "./dist/index.global.js", "types": "./dist/index.d.ts", "files": [ "dist" ], "exports": { ".": { "import": "./dist/index.js", "require": "./dist/index.cjs", "types": "./dist/index.d.ts", "script": "./dist/index.global.js", "default": "./dist/index.js" }, "./subModule": { "import": "./dist/subModule.js", "require": "./dist/subModule.cjs", "types": "./dist/subModule.d.ts", "default": "./dist/subModule.js" }, } }This is all done inside of a
pnpmmonorepo workspace where each package establishes their dependency via use ofworkspace:^. Despite the above configuration, I cannot get the second entry point"@org/myLib/subModule"to be recognized no matter what I do. It appears I must be misunderstanding something with regards to properly setting this up. Can someone please help me resolve this?Beta Was this translation helpful? Give feedback.
All reactions