Skip to content

exports: true doesn't respect package.json indentation #346

@gBasil

Description

@gBasil

Clear and concise description of the problem

When using the config option exports: true, the indentation is overwritten to use two spaces, regardless of what it was before:

`${JSON.stringify(
{ ...pkg, ...generated, packageJsonPath: undefined },
null,
2,
)}\n`,

Suggested solution

It would be ideal if the exports feature could auto-detect and use the actual indentation used in the package.json.

Alternative

A config option where the desired indentation could be specified.

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions