Skip to content

Commit

Permalink
docs: assume tree-shaking bundler is the most common case (#5160)
Browse files Browse the repository at this point in the history
Refs: #4730
  • Loading branch information
aduh95 authored May 23, 2024
1 parent f72138f commit a030861
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
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 @@ -1356,9 +1356,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

0 comments on commit a030861

Please sign in to comment.