Prechádzať zdrojové kódy

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

Refs: https://github.com/transloadit/uppy/pull/4730
Antoine du Hamel 11 mesiacov pred
rodič
commit
a0308610a6
2 zmenil súbory, kde vykonal 5 pridanie a 4 odobranie
  1. 1 1
      docs/guides/building-plugins.md
  2. 4 3
      docs/uppy-core.mdx

+ 1 - 1
docs/guides/building-plugins.md

@@ -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) {

+ 4 - 3
docs/uppy-core.mdx

@@ -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`.
 
 :::