Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

Commit 1835b16

Browse files
committed
support compact and comments babel options
1 parent 0a817fc commit 1835b16

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

plugin-babel.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ function prepend(a, b) {
4646
* stage1: true / false (defaults to false)
4747
* plugins: array of custom plugins (objects or module name strings)
4848
* presets: array of custom presets (objects or module name strings)
49+
* compact: as in Babel
50+
* comments: as in Babel
4951
*
5052
* babelOptions can be set at SystemJS.babelOptions OR on the metadata object for a given module
5153
*/
@@ -55,7 +57,9 @@ var defaultBabelOptions = {
5557
es2015: true,
5658
stage3: true,
5759
stage2: true,
58-
stage1: false
60+
stage1: false,
61+
compact: 'auto',
62+
comments: true
5963
};
6064

6165
exports.translate = function(load) {
@@ -158,6 +162,8 @@ exports.translate = function(load) {
158162
filename: load.address,
159163
sourceMaps: babelOptions.sourceMaps,
160164
inputSourceMap: load.metadata.sourceMap,
165+
compact: babelOptions.compact,
166+
comments: babelOptions.comments,
161167
code: true,
162168
ast: true,
163169
resolveModuleSource: function(m) {

0 commit comments

Comments
 (0)