[CHORE]: Remove Babel from stackgl_modules build process #7862
Copy link
Copy link
Closed
Labels
P2considered for next cycleconsidered for next cyclechoreTrack maintenance work (dependency bumps, build/CI, internal refactors, docs, etc.)Track maintenance work (dependency bumps, build/CI, internal refactors, docs, etc.)good for agentplotly-internalsize: 1taskone-off taskone-off task
Description
Description
Remove Babel-related dependencies from the stackgl_modules build process.
Notes
stackgl_modulesis a pre-bundled vendor folder- The
stackgl_modulesbuild process has used Babel to transpile the included dependencies to ES5 syntax - plotly.js uses esbuild for bundling and that can handle the transpiling
- This was discovered in a recent dependabot PR (Bump the npm_and_yarn group across 2 directories with 2 updates #7846)
Scope
In stackgl_modules/webpack.config.js:
- Remove both
babel-loaderrules (the project-files rule is effectively a no-op without a babel config; thebuffer/is-mobilerule is redundant with esbuild) - Remove
target: ['web', 'es5']
In stackgl_modules/package.json, drop the now-unused devDeps:
@babel/core@babel/preset-env@babel/plugin-transform-modules-commonjsbabel-loader
ify-loader (glslify) and raw-loader must stay — they handle the GLSL shader preprocessing that's the actual reason this pre-bundle exists.
Testing
- After removing the babel rules, run
npm run bundle-stackgl - Rebuild plotly.js and smoke-test 3D traces (scatter3d / mesh3d / surface) to confirm things still run/look the same
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2considered for next cycleconsidered for next cyclechoreTrack maintenance work (dependency bumps, build/CI, internal refactors, docs, etc.)Track maintenance work (dependency bumps, build/CI, internal refactors, docs, etc.)good for agentplotly-internalsize: 1taskone-off taskone-off task
Activity
archmoj commentedon Jul 1, 2026
The
stackgl_modulesfolder was added in #6004 to continue supporting older versions of npm and node.js.Now that supporting those versions are no longer needed, one could bring back
stackgldependencies fromplotly.js/stackgl_modules/package.json
Lines 11 to 46 in b633ef4
package.jsonand useesbuild.jendrikw commentedon Jul 14, 2026
I think this would also fix #7654
camdecoster commentedon Jul 15, 2026
Given @archmoj's comment, I think we'll handle this internally.