Skip to content

Commit 11dba5f

Browse files
authored
add info about partial bundles
1 parent bc917ac commit 11dba5f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,20 @@ See [this file](https://github.com/plotly/plotly.js/blob/master/src/lib/loggers.
3333
and use the plotly.js `dist` file(s). More info [here](https://github.com/plotly/plotly.js/blob/master/dist/README.md).
3434

3535
#### Clone the repo
36+
3637
```bash
3738
git clone https://github.com/plotly/plotly.js.git
3839
```
3940

4041
and use the plotly.js `dist` file(s).
4142

4243
#### Install with `npm`
44+
4345
```bash
4446
npm install plotly.js
4547
```
4648

47-
and use the plotly.js `dist` file(s) or require plotly.js using CommonJS as `var Plotly = require('plotly.js');`.
49+
and require plotly.js using CommonJS as `var Plotly = require('plotly.js');` or use the plotly.js `dist` file(s).
4850

4951
#### Use the plotly.js CDN hosted by Fastly:
5052
```html
@@ -64,7 +66,9 @@ and use the `Plotly` object in the window scope.
6466

6567
## Modules
6668

67-
If you would like to reduce the bundle size of plotly.js, you can create a *custom* bundle by using `plotly.js/lib/core`, and loading only the trace types that you need (e.g. `pie` or `choropleth`). The recommended way to do this is by creating a *bundling file*:
69+
Starting in `v1.15.0`, plotly.js also ships with several _partial_ bundles (more info [here](https://github.com/plotly/plotly.js/blob/master/dist/README.md#partial-bundles)).
70+
71+
If you would like to manually pick which plotly.js modules to include, you can create a *custom* bundle by using `plotly.js/lib/core`, and loading only the trace types that you need (e.g. `pie` or `choropleth`). The recommended way to do this is by creating a *bundling file*:
6872

6973
```javascript
7074
// in custom-plotly.js

0 commit comments

Comments
 (0)