From a25a8c83e46a9c9c1f741283eb961483ce83577f Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 18 Aug 2015 17:50:49 -0700 Subject: [PATCH] Use same babel options for compiling bundled packages --- build/Gruntfile.coffee | 3 ++- src/babel.coffee | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 0ff65d506..4329c9cd9 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -3,6 +3,7 @@ path = require 'path' os = require 'os' glob = require 'glob' usesBabel = require './lib/uses-babel' +babelOptions = require('../src/babel').defaultOptions # Add support for obselete APIs of vm module so we can make some third-party # modules work under node v0.11.x. @@ -81,7 +82,7 @@ module.exports = (grunt) -> ext: '.js' babelConfig = - options: {} + options: babelOptions dist: files: [] diff --git a/src/babel.coffee b/src/babel.coffee index 0adc19db4..afa48eb1c 100644 --- a/src/babel.coffee +++ b/src/babel.coffee @@ -188,6 +188,7 @@ module.exports = setCacheDirectory: setCacheDirectory getCacheMisses: -> stats.misses getCacheHits: -> stats.hits + defaultOptions: defaultOptions # Visible for testing. createBabelVersionAndOptionsDigest: createBabelVersionAndOptionsDigest