discourse/app/assets/javascripts/discourse/lib/common-babel-config.js
David Taylor 1b28b8e169
DEV: Upgrade babel & remove vendored safari-bugfix transformation (#28208)
The Safari 15 bugfix has been rolled into @babel/preset-env in the most recent version, so we no longer need to carry our vendored copy.

This commit updates @babel/preset-env, runs npx yarn-deduplicate yarn.lock, and removes the vendored transform.

This commit also refactors our theme transpiler to use @babel/preset-env, with the same list of target browsers as our ember-cli build uses. This means we no longer need to maintain a separate list of babel transforms for themes.
2024-08-05 10:35:26 +01:00

22 lines
432 B
JavaScript

module.exports = function generateCommonBabelConfig() {
return {
"ember-cli-babel": {
throwUnlessParallelizable: true,
disableDecoratorTransforms: true,
},
babel: {
sourceMaps: false,
plugins: [
require.resolve("deprecation-silencer"),
[
require.resolve("decorator-transforms"),
{
runEarly: true,
},
],
],
},
};
};