You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CUSTOM_BUNDLE.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,47 +10,47 @@ npm i
10
10
11
11
By default all traces and transforms are included in the bundle if you simply run:
12
12
```sh
13
-
npm run partial-bundle
13
+
npm run custom-bundle
14
14
```
15
15
16
16
Use the `traces` option to include just the trace types you need.
17
17
```sh
18
-
npm run partial-bundle -- --traces scatter,scattergl,scatter3d
18
+
npm run custom-bundle -- --traces scatter,scattergl,scatter3d
19
19
```
20
20
Please note that the `scatter` trace is currently included in all bundles and cannot be removed.
21
21
[This behaviour may change in the future](https://github.com/plotly/plotly.js/pull/5535), so we recommend that you explicitly include `scatter` anyway if you need it in your bundle.
22
22
23
23
Use the `transforms` option to specify which should be included.
24
24
```sh
25
-
npm run partial-bundle -- --transforms sort,filter
25
+
npm run custom-bundle -- --transforms sort,filter
26
26
```
27
27
28
28
Or use `transforms none` to exclude them all.
29
29
```sh
30
-
npm run partial-bundle -- --transforms none
30
+
npm run custom-bundle -- --transforms none
31
31
```
32
32
33
33
Use the `out` option to change the bundle filename (default `custom`).
34
34
The new bundle will be created in the `dist/` directory and named `plotly-<out>.min.js` or `plotly-<out>.js` if unminified.
35
35
```sh
36
-
npm run partial-bundle -- --out myBundleName
36
+
npm run custom-bundle -- --out myBundleName
37
37
```
38
38
39
39
Use the `unminified` option to disable compression.
40
40
```sh
41
-
npm run partial-bundle -- --unminified
41
+
npm run custom-bundle -- --unminified
42
42
```
43
43
44
44
# Example illustrating use of different options together
45
45
To create an unminified custom bundle named `myScatters` including `scatter`, `scattergl` and `scatter3d` traces without any transforms:
0 commit comments