Skip to content

chore: remove Babel build step and unused dependencies#63

Merged
willeastcott merged 1 commit into
mainfrom
chore/remove-babel
Apr 14, 2026
Merged

chore: remove Babel build step and unused dependencies#63
willeastcott merged 1 commit into
mainfrom
chore/remove-babel

Conversation

@willeastcott
Copy link
Copy Markdown
Contributor

Summary

  • Remove the Babel build step from the Rollup config since @rollup/plugin-typescript handles all transpilation
  • Remove 4 unused devDependencies: @babel/core, @babel/eslint-parser, @babel/preset-env, @rollup/plugin-babel
  • Prunes 128 packages from node_modules

The Babel layer was transpiling TypeScript's ES6 output down to ES5 for IE11 (EOL since June 2022) in UMD/CJS builds, and doing effectively nothing for ESM builds. With modern browser/Node targets, TypeScript alone is sufficient.

Test plan

  • npm run build produces all three outputs (CJS, ESM, UMD)
  • npm run lint passes
  • npm test passes (21/21 tests)

TypeScript alone handles all transpilation, making the Babel layer
redundant. This removes @babel/core, @babel/eslint-parser,
@babel/preset-env, and @rollup/plugin-babel, pruning 128 packages
from node_modules.

Made-with: Cursor
@willeastcott willeastcott requested a review from Copilot April 14, 2026 19:42
@willeastcott willeastcott self-assigned this Apr 14, 2026
@willeastcott willeastcott added enhancement New feature or request dependencies Pull requests that update a dependency file and removed enhancement New feature or request labels Apr 14, 2026
@willeastcott willeastcott merged commit 30ca994 into main Apr 14, 2026
5 checks passed
@willeastcott willeastcott deleted the chore/remove-babel branch April 14, 2026 19:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the Babel transpilation layer from the Rollup build, relying on @rollup/plugin-typescript for compilation, and prunes now-unused Babel-related dev dependencies to reduce install footprint.

Changes:

  • Remove @rollup/plugin-babel usage and related preset configuration from rollup.config.mjs.
  • Remove Babel-related devDependencies from package.json.
  • Update package-lock.json to reflect the dependency graph after pruning.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
rollup.config.mjs Drops Babel from UMD/CJS/ESM bundling so Rollup uses only the TypeScript plugin.
package.json Removes unused Babel and Rollup Babel plugin devDependencies.
package-lock.json Removes Babel and associated transitive packages from the lockfile.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rollup.config.mjs
Comment on lines 10 to +13
plugins: [
typescript({
sourceMap: false
}),
babel(nonEsmOptions)
})
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the Babel step means the UMD/CJS bundles are no longer downleveled to ES5 (previously targeted IE11) and will now reflect the TypeScript target (tsconfig.json target=es6). If ES5/legacy-browser support is intentionally dropped, consider documenting the new minimum runtime target (e.g., ES2015+) in README and/or release notes (and ensure versioning reflects a potentially breaking compatibility change).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants