Cannot resolve preset with path. · Issue #464 · unjs/unbuild · GitHub
Skip to content

Cannot resolve preset with path. #464

Description

@cpreston321

Environment

20.18.1

Reproduction

Jiti import resolves with a .default and then the JSON, currently it does not return that.

Describe the bug

When defining the preset and then having it resolve using directory path it returns an object like:

{
   default: {
     clean: true,
     declaration: true,
     sourcemap: true,
     rollup: { emitCJS: true, inlineDependencies: true, esbuild: [Object] }
   }
}

Additional context

I was upgrading clack and we use definePreset() as a base, then I tried running build so I changed the code locally within node modules, and this worked.

https://github.com/bombshell-dev/clack - Upgraded to v3 and it errored out.

Logs

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions