Open prisis opened 3 months ago
I'd like to use the src/ dir (i.e., TS) vs. dist/ (i.e., JS) when using the package within the monorepo via the workspace: protocol. Essentially, I want to be able to define a different config when not published, relying on pnpm's publishConfig to do the overrides when I publish to the npm registry:
"publishConfig": {
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
}
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"main": "./src/index.ts",
TODOs:
export default Tr;
will return for .cjs
will return for .d.cts
Plugins
Typescript
baseUrl - a root directory from which to resolve non-relative paths, in addition to node_modules. paths - additional directories, relative to baseUrl, that should also be searched. rootDirs - virtual directories that relative paths can be resolved from