Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing BuildConfig[] to defineBuildConfig fails on export validation if each BuildConfig iterative populates the ./dist with the exported files. #356

Open
joemckenney opened this issue Jan 7, 2024 · 0 comments

Comments

@joemckenney
Copy link
Contributor

Environment

Node v20.10.0

Package(s) The family of tools in https://github.com/pkg-tools/pkg-tools e.g.

https://www.npmjs.com/package/@pkg-tools/build
https://www.npmjs.com/package/@pkg-tools/clean
https://www.npmjs.com/package/@pkg-tools/format
https://www.npmjs.com/package/@pkg-tools/lint
https://www.npmjs.com/package/@pkg-tools/sync

Reproduction

The easiest explanation/reproduction is this pull request.

I had to add failOrWarn: false to all of the CLI package's build configurations due to them iteratively generating the outputs that satisfy the package.json's exports field.

Describe the bug

When passing a set of build configurations (i.e., BuildConfig[]) whose outputs will cumulatively satisfy the exports specified in the package.json's exports field, unbuild will fail on validation after the first output due to the package.json's exports not existing in the output directory.

Additional context

I'm more than happy to contribute a fix.

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant