mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Set extraFeatures.jscript on the server too for better caching.
The jscript transform is perfectly safe for server code, and relatively cheap compared to the cost of having to compile every file for both the client and the server, just because the set of plugins is different.
This commit is contained in:
@@ -311,8 +311,8 @@
|
||||
"from": "babel-types@>=6.16.0 <6.17.0"
|
||||
},
|
||||
"babylon": {
|
||||
"version": "6.11.4",
|
||||
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.11.4.tgz",
|
||||
"version": "6.11.6",
|
||||
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.11.6.tgz",
|
||||
"from": "babylon@>=6.11.4 <6.12.0"
|
||||
},
|
||||
"balanced-match": {
|
||||
|
||||
@@ -64,16 +64,13 @@ BCp.processOneFileForTarget = function (inputFile, source) {
|
||||
// compilation, give it the following file extension: .es5.js
|
||||
! excludedFileExtensionPattern.test(inputFilePath)) {
|
||||
|
||||
var targetCouldBeInternetExplorer8 =
|
||||
inputFile.getArch() === "web.browser";
|
||||
|
||||
var extraFeatures = Object.assign({}, this.extraFeatures);
|
||||
|
||||
if (! extraFeatures.hasOwnProperty("jscript")) {
|
||||
// Perform some additional transformations to improve compatibility
|
||||
// in older browsers (e.g. wrapping named function expressions, per
|
||||
// http://kiro.me/blog/nfe_dilemma.html).
|
||||
extraFeatures.jscript = targetCouldBeInternetExplorer8;
|
||||
extraFeatures.jscript = true;
|
||||
}
|
||||
|
||||
var babelOptions = Babel.getDefaultOptions(extraFeatures);
|
||||
|
||||
Reference in New Issue
Block a user