|
@ -9,17 +9,17 @@ module.exports = { |
|
|
options: { |
|
|
options: { |
|
|
plugins: [ |
|
|
plugins: [ |
|
|
{ |
|
|
{ |
|
|
transformBundle: function ( source ) { |
|
|
transformBundle: function ( code, map ) { |
|
|
var options = { fromString: true }; |
|
|
var options = { fromString: true }; |
|
|
|
|
|
|
|
|
if ( source.map != null ) { |
|
|
if ( map != null ) { |
|
|
options.inSourceMap = source.map; |
|
|
options.inSourceMap = map; |
|
|
options.outSourceMap = "out"; |
|
|
options.outSourceMap = "out"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var result = uglify.minify( source.code, options ); |
|
|
var result = uglify.minify( code, options ); |
|
|
|
|
|
|
|
|
if (source.map != null) { |
|
|
if ( map != null ) { |
|
|
result.code = result.code.slice( 0, -25 ); |
|
|
result.code = result.code.slice( 0, -25 ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|