]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Update v3-migration.md (#8622)
authorJacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
Sat, 13 Mar 2021 12:03:04 +0000 (13:03 +0100)
committerGitHub <noreply@github.com>
Sat, 13 Mar 2021 12:03:04 +0000 (14:03 +0200)
Add note in migration guide about ability to use the `auto` register path as a npm module

docs/docs/getting-started/v3-migration.md

index 0839631eaf2216c14cf8e1a8f2dd4c5c28bc3d28..e0fcc7d72f12e2fd1ac903641c263090c5342fce 100644 (file)
@@ -22,7 +22,7 @@ Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released
 * Chart.js is no longer providing the `Chart.bundle.js` and `Chart.bundle.min.js`. Please see the [installation](installation.md) and [integration](integration.md) docs for details on the recommended way to setup Chart.js if you were using these builds.
 * `moment` is no longer specified as an npm dependency. If you are using the `time` or `timeseries` scales, you must include one of [the available adapters](https://github.com/chartjs/awesome#adapters) and corresponding date library. You no longer need to exclude moment from your build.
 * The `Chart` constructor will throw an error if the canvas/context provided is already in use
-* Chart.js 3 is tree-shakeable. So if you are using it as an `npm` module in a project, you need to import and register the controllers, elements, scales and plugins you want to use. You will not have to call `register` if importing Chart.js via a `script` tag, but will not get the tree shaking benefits in this case. Here is an example of registering components:
+* Chart.js 3 is tree-shakeable. So if you are using it as an `npm` module in a project and want to make use of this feature, you need to import and register the controllers, elements, scales and plugins you want to use. You will not have to call `register` if importing Chart.js via a `script` tag or from the [`auto`](integration.md#bundlers-webpack-rollup-etc) register path as an `npm` module, but will not get the tree shaking benefits in this case. Here is an example of registering components:
 
 ```javascript
 import { Chart, LineController, LineElement, PointElement, LinearScale, Title } from `chart.js`