From e5e7353f33aac12061e7e63140eddc556750d974 Mon Sep 17 00:00:00 2001 From: Chris Garrett Date: Thu, 4 Apr 2019 15:26:39 -0700 Subject: [PATCH] [BUGFIX lts] Fixes a regression in the legacy build For some reason, the 'transform-template-literals' plugin is now required even in our standard non-evergreen builds. We really just need to finish up making ember-source an addon, but this should fix people's builds for the time being. --- broccoli/to-es5.js | 3 +-- broccoli/to-named-amd.js | 1 + lib/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/broccoli/to-es5.js b/broccoli/to-es5.js index ae56fdb28c8..fcf9cc418f2 100644 --- a/broccoli/to-es5.js +++ b/broccoli/to-es5.js @@ -3,13 +3,12 @@ const Babel = require('broccoli-babel-transpiler'); const injectBabelHelpers = require('./transforms/inject-babel-helpers'); -module.exports = function toES6(tree, _options) { +module.exports = function toES5(tree, _options) { let options = Object.assign({}, _options); options.sourceMaps = true; options.plugins = [ injectBabelHelpers, - ['@babel/transform-template-literals', { loose: true }], ['@babel/transform-literals'], ['@babel/transform-arrow-functions'], ['@babel/transform-destructuring', { loose: true }], diff --git a/broccoli/to-named-amd.js b/broccoli/to-named-amd.js index d309c2ef237..d8264b1aaff 100644 --- a/broccoli/to-named-amd.js +++ b/broccoli/to-named-amd.js @@ -23,6 +23,7 @@ module.exports = function processModulesOnly(tree, strict = false) { // ensures `@glimmer/compiler` requiring `crypto` works properly // in both browser and node-land injectNodeGlobals, + ['@babel/transform-template-literals', { loose: true }], ['module-resolver', { resolvePath: resolveRelativeModulePath }], ['@babel/transform-modules-amd', transformOptions], enifed, diff --git a/lib/index.js b/lib/index.js index 80f1d8461a0..ced4529b18c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -70,7 +70,6 @@ module.exports = { let emberCliBabel = this.addons.find(a => a.name === 'ember-cli-babel'); let needsLegacyBuild = [ - 'transform-template-literals', 'transform-literals', 'transform-arrow-functions', 'transform-destructuring', @@ -79,6 +78,7 @@ module.exports = { 'transform-computed-properties', 'transform-shorthand-properties', 'transform-block-scoping', + 'transform-classes', ].some(p => emberCliBabel.isPluginRequired(p)); if (needsLegacyBuild) {