-
Notifications
You must be signed in to change notification settings - Fork 107
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the feature
I'm using unbuild in a pnpm monorepo. I love how unbuild works seamlessly with the definitions in my package.json to produce CommonJS, ESM, and Types automatically. However, I've run into an issue.
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",Maybe there is a better way to do what I'm after, or maybe this is a feature that could be made to work with unbuild: if publishConfig is present in package.json, override things before using the bast config in package.json to define the build.
Additional information
- Would you be willing to help implement this feature?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request