-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX beta][FEAT] Adds a second dist build which targets IE
This PR adds a second dist to the build which targets IE. This allows the primary bundles to drop ES5 compilation from babel, and allows us to choose which bundles we want to use based on the consuming application's targets. In the long run, we want to actually enable consuming apps to build the Ember source code themselves. This is a temporary in-between measure to address a bug in native classes, in which users who do _not_ have IE as a build target cannot `.extend` from native classes due to conflicts in transpilation vs actual native class syntax.
- Loading branch information
Showing
18 changed files
with
333 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
'use strict'; | ||
|
||
const Babel = require('broccoli-babel-transpiler'); | ||
const FEATURES = require('./features'); | ||
|
||
module.exports = function debugMacros(tree, environment) { | ||
let isDebug = environment !== 'production'; | ||
|
||
let plugins = [ | ||
[ | ||
'debug-macros', | ||
{ | ||
debugTools: { | ||
source: '@ember/debug', | ||
assertPredicateIndex: 1, | ||
isDebug, | ||
}, | ||
externalizeHelpers: { | ||
module: true, | ||
}, | ||
flags: [ | ||
{ source: '@glimmer/env', flags: { DEBUG: isDebug } }, | ||
{ | ||
source: '@ember/canary-features', | ||
flags: Object.assign( | ||
// explicit list of additional exports within @ember/canary-features | ||
// without adding this (with a null value) an error is thrown during | ||
// the feature replacement process (e.g. XYZ is not a supported flag) | ||
{ | ||
FEATURES: null, | ||
DEFAULT_FEATURES: null, | ||
isEnabled: null, | ||
}, | ||
FEATURES | ||
), | ||
}, | ||
], | ||
}, | ||
], | ||
]; | ||
|
||
return new Babel(tree, { plugins }); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
'use strict'; | ||
|
||
const Babel = require('broccoli-babel-transpiler'); | ||
|
||
module.exports = function stripForProd(tree) { | ||
let options = { | ||
plugins: [ | ||
['filter-imports', { imports: { 'ember-babel': ['_classCallCheck'] } }], | ||
], | ||
}; | ||
|
||
return new Babel(tree, options); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.