Skip to content

Commit

Permalink
[BUGFIX lts] Fixes a regression in the legacy build
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Chris Garrett committed Apr 10, 2019
1 parent 3449a8f commit e5e7353
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions broccoli/to-es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }],
Expand Down
1 change: 1 addition & 0 deletions broccoli/to-named-amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -79,6 +78,7 @@ module.exports = {
'transform-computed-properties',
'transform-shorthand-properties',
'transform-block-scoping',
'transform-classes',
].some(p => emberCliBabel.isPluginRequired(p));

if (needsLegacyBuild) {
Expand Down

0 comments on commit e5e7353

Please sign in to comment.