Since Drupal 8.4.0, Drupal core has included an ES6 build process utilizing Babel. This has been a required step for core development to allow utilizing modern JavaScript while retaining support for all of the browsers supported by Drupal.

As we have announced earlier, Drupal 10 will drop support for Internet Explorer 11. This means that all of the browsers supported by Drupal core also support ES6. Therefore, the build process is no longer necessary, since its main purpose was to provide compatibility for non-ES6-compatible browsers.

Impact for contributed projects

While the build tool has always been considered as an internal core development tool, many contributed projects also use it to utilize ES6 features while retaining support for all browsers supported by Drupal core. To notify these contributed projects, in Drupal 9.4.0 and later, there will be a deprecation warning issued for anyone using yarn run watch:js or yarn run build:js.

These commands will be available in the Drupal 10.0.0 development branch until September 1, 2022 (near the deadline for the 10.0.0-beta1) to simplify work across multiple branches. We therefore recommend completing any important JavaScript changes for Drupal 9.5.x before that date. After September 1, the extra JavaScript files, the build step commands, and the associated dependencies will be removed from Drupal 10 core, and we will limit which JavaScript changes are backported to 9.5.x.

After the build tool is removed from Drupal 10, contributed projects may still continue to use Drupal 9.5.x to build their JavaScript. We recommend that branches of contributed projects that are Drupal-9-compatible continue supporting Internet Explorer 11 until Drupal 9's end-of-life in November 2023. The presence of the transpiled, ES5-compatible files in contributed projects will not cause any issues for code that is otherwise Drupal-10-compatible.

Internet Explorer 11 support beyond Drupal 9

In some rare cases, projects may want to support Internet Explorer 11 beyond Drupal 9. Currently the best way to do that would be to include a copy of the build process in the contributed project itself. It should be relatively straightforward to create an npm package that provides this tooling for anyone who needs this, but there are no plans from the core maintainers to implement this at least at the moment. Contributions of a new, standalone JavaScript project are welcome if you’d like to utilize tooling like this on your project going forward.