diff --git a/bin/TypeScriptBuildWebpackPlugin.js b/bin/TypeScriptBuildWebpackPlugin.js index 2d6b5417..79d617a0 100644 --- a/bin/TypeScriptBuildWebpackPlugin.js +++ b/bin/TypeScriptBuildWebpackPlugin.js @@ -55,6 +55,7 @@ function minifyChunkAssets(compilation, chunks, sourceMap) { compilation.assets[fileName] = output; }).catch(minifyError => { Shout_1.Shout.error(`when minifying ${chalk_1.default.blue(fileName)} during JS build:`, minifyError); + Shout_1.Shout.warning('Only', chalk_1.default.yellow('ES5'), 'modules are suppported. Check', chalk_1.default.cyan('tsconfig.json:target'), 'or', chalk_1.default.cyan('package.json'), 'dependencies.'); compilation.errors.push(minifyError); }); tasks.push(t2); diff --git a/package.json b/package.json index e50a1d07..6989e112 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "source-map": "0.7.3", "tslint": "5.11.0", "typescript": "3.1.0-rc.20180911", - "uglify-js": "3.4.9", + "uglify-js": "3.4.8", "upath": "1.1.0", "vue-loader": "15.4.2", "vue-template-compiler": "2.5.17", @@ -97,6 +97,7 @@ "ava": "1.0.0-beta.8" }, "resolutions": { - "**/@types/node": "8" + "**/@types/node": "8", + "**/uglify-js": "3.4.8" } } diff --git a/src/TypeScriptBuildWebpackPlugin.ts b/src/TypeScriptBuildWebpackPlugin.ts index ad774357..00da2dd0 100644 --- a/src/TypeScriptBuildWebpackPlugin.ts +++ b/src/TypeScriptBuildWebpackPlugin.ts @@ -72,6 +72,8 @@ function minifyChunkAssets(compilation: webpack.compilation.Compilation, chunks: compilation.assets[fileName] = output; }).catch(minifyError => { Shout.error(`when minifying ${chalk.blue(fileName)} during JS build:`, minifyError); + Shout.warning('Only', chalk.yellow('ES5'), 'modules are suppported. Check', + chalk.cyan('tsconfig.json:target'), 'or', chalk.cyan('package.json'), 'dependencies.'); compilation.errors.push(minifyError); }); diff --git a/yarn.lock b/yarn.lock index 50eb96f5..3a08a530 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5461,10 +5461,10 @@ uglify-es@^3.3.4: commander "~2.13.0" source-map "~0.6.1" -uglify-js@3.4.9, uglify-js@3.4.x: - version "3.4.9" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" - integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q== +uglify-js@3.4.8, uglify-js@3.4.x: + version "3.4.8" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.8.tgz#d590777b208258b54131b1ae45bc9d3f68033a3e" + integrity sha512-WatYTD84gP/867bELqI2F/2xC9PQBETn/L+7RGq9MQOA/7yFBNvY1UwXqvtILeE6n0ITwBXxp34M0/o70dzj6A== dependencies: commander "~2.17.1" source-map "~0.6.1"