azure-functions-pack
azure-functions-pack copied to clipboard
Uglify support for ES6
Run running against the test suite, got error on Uglify scenario
============ Running pack with uglify (long running) ============
info: Generating project files/metadata
info: Webpacking project
error: Hash: b24481aede55911f5033
Version: webpack 3.0.0
Time: 25083ms
Asset Size Chunks Chunk Names
output.js 27.7 MB 0 [emitted] [big] main
[716] ./.funcpack/index.js 485 bytes {0} [built]
[717] ./entryPoint/index.js 499 bytes {0} [built]
[718] ./excluded/index.js 260 bytes {0} [built]
[719] ./lib/externalScriptFile.js 222 bytes {0} [built]
[720] ./largeimport/index.js 288 bytes {0} [built]
[721] ./node_modules/azure/lib/azure.js 79.9 kB {0} [built]
[1901] ./node_modules/azure-arm-datalake-store/lib/dataLakeStore.js 889 bytes {0} [built]
[1938] ./node_modules/azure-arm-batch/lib/batchManagementClient.js 3.79 kB {0} [built]
[1962] ./node_modules/azure-batch/lib/batch.js 818 bytes {0} [built]
[2349] ./libimport/index.js 301 bytes {0} [built]
[2350] ./lib/model.js 331 bytes {0} [built]
[2434] ./scriptFile/usemeinstead.js 238 bytes {0} [built]
[2435] ./simple/index.js 204 bytes {0} [built]
[2436] ./simpleimport/index.js 291 bytes {0} [built]
[2437] ./node_modules/lodash/lodash.js 540 kB {0} [built]
+ 2423 hidden modules
WARNING in ./node_modules/ms-rest/lib/serviceClient.js
294:17-41 Critical dependency: the request of a dependency is an expression
ERROR in output.js from UglifyJs
Unexpected token: name (model) [output.js:690921,4]
=======> operation took +26931.2188ms to run
Uglify doesn't support ES6. I fixed this before with a hack, but that left WebPack itself behind.
Looks like uglify-es is going to support ES6, but I think, given the dubious performance benefits that uglify offers funcpack, I'm going to disable it in the next release so we can keep moving webpack forward.
https://github.com/mishoo/UglifyJS2/tree/harmony
Kept the support in by marked it deprecated in 0.3.0