Commit 7b2500a
feat: convert plotly.js source from CJS to ESM
Converts all 971 source files in `src/` and `lib/` from CommonJS
to ES modules. Build scripts in `tasks/` and `build/` renamed to `.cjs`.
Adds `"type": "module"` to package.json.
All bundle variants compile and render correctly:
lite: 1,942 KB → 839 KB minified (was 915 KB CJS)
minimal: 2,249 KB → 958 KB minified (was 1,052 KB CJS)
basic: 2,577 KB → 1,031 KB minified (was 1,158 KB CJS)
+ cartesian, geo, gl3d, gl2d, mapbox, finance bundles
Remaining: `npm run build` pipeline needs `preprocess.cjs` updated
to handle ESM source modules (requires dynamic import or conversion
to .mjs). The esbuild-based bundling works; only the string-based
build tasks (preprocess, find-strings, stats) need CJS→ESM interop.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 6b3591e commit 7b2500a
File tree
300 files changed
+1392
-794
lines changed- lib
- specs
- src
- lib
- plots
- geo
- gl3d
- layout
- mapbox
- map
- polar
- smith
- ternary
- traces
- barpolar
- box
- candlestick
- carpet
- choroplethmapbox
- choroplethmap
- choropleth
- cone
- contour
- densitymapbox
- densitymap
- funnelarea
- funnel
- heatmap
- histogram2dcontour
- histogram2d
- histogram
- icicle
- image
- indicator
- isosurface
- mesh3d
- ohlc
- parcats
- parcoords
- sankey
- scatter3d
- scattercarpet
- scattergeo
- scattergl
- scattermapbox
- scattermap
- scatterpolargl
- scatterpolar
- scattersmith
- scatterternary
- splom
- streamtube
- sunburst
- surface
- table
- treemap
- violin
- volume
- waterfall
- transforms
- tasks
- util
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
300 files changed
+1392
-794
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
0 commit comments