Skip to content

build: remove babel from the build setup - #2679

Open
lucas-koehler wants to merge 1 commit into
masterfrom
lk/remove-babel
Open

lucas-koehler wants to merge 1 commit into
masterfrom
lk/remove-babel

Conversation

@lucas-koehler

Copy link
Copy Markdown
Contributor

Fixes #2651.

The base webpack config ran babel-loader with @babel/preset-env after ts-loader. It is only used by the dev servers of the React material and vanilla renderers, which don't need ES5 output, so ts-loader is enough.

The Vue packages also used babel: rollup-plugin-babel in the library builds, a babel.config.js, and @vue/cli-plugin-babel for the vue-cli dev server and tests. All of this is removed.

Babel transpiled the ESM and CJS bundles of @jsonforms/vue and @jsonforms/vue-vanilla to ES5, because preset-env had no targets. Both bundles now use the tsconfig target ES2021, like the ESM bundles of core and react. The CJS target: 'ES5' override was placed outside compilerOptions and never applied, so it is removed as well. MIGRATION.md documents the change.

Also removes leftovers that only existed for babel or were unused:

  • @babel/preset-env, babel-loader and core-js from the root
  • core-js from vue and vue-vuetify
  • @vue/vue3-jest and @types/jest from vue-vanilla, which tests with mocha
  • the unused ava config in react, which referenced babel-register

Babel is still installed transitively through jest, @vue/vue3-jest and the vue-cli tooling.

Fixes #2651.

The base webpack config ran babel-loader with @babel/preset-env after
ts-loader. It is only used by the dev servers of the React material and
vanilla renderers, which don't need ES5 output, so ts-loader is enough.

The Vue packages also used babel: rollup-plugin-babel in the library
builds, a babel.config.js, and @vue/cli-plugin-babel for the vue-cli
dev server and tests. All of this is removed.

Babel transpiled the ESM and CJS bundles of @jsonforms/vue and
@jsonforms/vue-vanilla to ES5, because preset-env had no targets.
Both bundles now use the tsconfig target ES2021, like the ESM bundles
of core and react. The CJS target: 'ES5' override was placed outside
compilerOptions and never applied, so it is removed as well.
MIGRATION.md documents the change.

Also removes leftovers that only existed for babel or were unused:
- @babel/preset-env, babel-loader and core-js from the root
- core-js from vue and vue-vuetify
- @vue/vue3-jest and @types/jest from vue-vanilla, which tests with mocha
- the unused ava config in react, which referenced babel-register

Babel is still installed transitively through jest, @vue/vue3-jest and
the vue-cli tooling.
@netlify

netlify Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit 86b6acd
🔍 Latest deploy log https://app.netlify.com/projects/jsonforms-examples/deploys/6b0d9fb69f2b6f7f1e87e2d3
😎 Deploy Preview https://deploy-preview-2679--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 84.905%. remained the same — lk/remove-babel into master

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dev: consider dropping babel from base webpack config completely

2 participants