Is there any chance I can config entrypoints elsewhere? #58
-
QuestionI'm working on a monorepo project and I need to point one of my package A onto it's source code like "exports": {
".": {
"default": "./src/index.ts"
}
}, so when deving other packages I don't need to open a watch&compile process on A; they get realtime type and reference just out of box. BUT when it goes into production eventually I need to build this thing to js, and with pkgroll's config detection there will be no build at all. If I can configure it elsewhere, problem solved. So, is there such a way to do this? BTW pkgroll is really brilliant. I love it really. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If I understand your use-case, you want it to use Checkout this example where I use import maps (same thing as export maps but for internal paths) to specify a development path under the To access it, I just need to pass in |
Beta Was this translation helpful? Give feedback.
If I understand your use-case, you want it to use
.ts
files in development, and.js
in production? If so, that's exactly what export maps are for.Checkout this example where I use import maps (same thing as export maps but for internal paths) to specify a development path under the
development
condition: https://github.com/privatenumber/get-tsconfig/blob/d1c46c04f200a8239f3e5734c42011de1ea11380/package.json#L39To access it, I just need to pass in
development
to node:node -C development ./entry.js