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

docs: assume tree-shaking bundler is the most common case #5160

Merged
merged 5 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/guides/building-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The plugin constructor receives the Uppy instance in the first parameter, and
any options passed to `uppy.use()` in the second parameter.

```js
import BasePlugin from '@uppy/core/lib/BasePlugin.js';
import BasePlugin from '@uppy/core';

export default class MyPlugin extends BasePlugin {
constructor(uppy, opts) {
Expand Down
7 changes: 4 additions & 3 deletions docs/uppy-core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1374,9 +1374,10 @@ Checkout the [building plugins](/docs/guides/building-plugins) guide.

:::note

If you don’t use any UI plugins and want to make sure Preact isn’t bundled into
your app, import `BasePlugin` like this:
`import BasePlugin from '@uppy/core/lib/BasePlugin`.
If you don’t use any UI plugins, any modern bundler should be able to tree-shake
Preact code away. If you are not using a bundler that supports tree-shaking,
it’s also possible to import `BasePlugin` like this:
`import BasePlugin from '@uppy/core/lib/BasePlugin.js`.

:::

Expand Down