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

Preserve library structure #14

Merged
merged 7 commits into from
Sep 5, 2024
Merged

Preserve library structure #14

merged 7 commits into from
Sep 5, 2024

Conversation

jacob-alford
Copy link
Collaborator

This PR adjusts the way build-tools treats the root and source directories. Now, build-tools will preserve the structure of your library. This means that files built in the src directory will output in dist/src. And files in the root directory will output in dist. This is to allow multi-entrypoint libraries to opt-in to node10 support by simply moving their entrypoints into the root directory.

The only breaking change for everyone is that the "entrypoint" value for type: "single" in build-mode now no longer points to src. So if you are keeping your entrypoint in src you must update this value.

If you are not publishing from dist, you must also update your exports / main / module / types to reflect the new structure.

If you follow the above instructions, you can avoid pushing a breaking change to your library.

@jacob-alford jacob-alford merged commit 10ebb8b into main Sep 5, 2024
3 checks passed
@jacob-alford jacob-alford deleted the ja/preserve-lib-structure branch September 5, 2024 18:19
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

Successfully merging this pull request may close these issues.

1 participant