2017-09-18 2 views
0

J'essaie de publier un projet angulaire2 + SignalR avec webpack.Angular2 webpack publie UglifyJs Jeton inattendu (SignalR, NullLogger)

projet est sans travaux et publié UglifyJSPlugin

Je veux un code rapetisser JS

Avec UglifyJSPlugin

ERREUR dans dist/main.e0d2ac62d9e6f4ea96fd.bundle.js de UglifyJs de jeton inattendu: nom (NullLogger) [dist/main.e0d2ac62d9e6f4ea96fd.bundle.js: 4779,6]

NullLogger-from SignalR

webpack.prod.js

const UglifyJSPlugin = require('uglifyjs-webpack-plugin') 

new UglifyJSPlugin({ 
    parallel: { 
     cache: true, 
     workers: 2 
    }, 
    warnings: true 
    }), 

I was used this - not help

Ce que je peux fixer l'air

Répondre

0

Apparemment, ce problème est dans la bibliothèque UglifyJs, parce qu'il n'a pas de soutien ES6. Vérifiez this thread et correctif possible dans damienbod answer.