Skip to content

feat: export everything from entry points #710

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

Merged
merged 1 commit into from
May 23, 2023

Conversation

aarthificial
Copy link
Contributor

@aarthificial aarthificial commented May 23, 2023

This PR introduces new ES bundles for both core and 2d. They contain the same things as the lib directory, except rolled up into one single file.

As of right now, they are not published to npm to prevent mistakenly mixing them with the contents of the lib directory.
In v4, the lib directories will be removed and replaced with these bundles.

To make it possible, all entities should now be imported directly from the package's entry point:

import {all, createRef} from '@motion-canvas/core';
import {makeScene2D, Circle} from '@motion-canvas/2d';

Importing from subdirectories will continue working until v4.

All entities should now be imported directly from the package's entry point:
```ts
import {all, createRef} from '@motion-canvas/core';
import {makeScene2D, Circle} from '@motion-canvas/2d';
```

Importing from subdirectories will continue working until v4.
@aarthificial aarthificial merged commit 3c885d9 into motion-canvas:main May 23, 2023
@aarthificial aarthificial deleted the entry-point branch May 23, 2023 08:01
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