Closed SamuelBeliveau closed 6 years ago
I've just tried it with webpack@2.7.0 and 3.x and it appears to be working... If it might be possible to isolate - would you care to share some code that reproduces the issue?
FWIW, the code at that line looks pretty normal:
let len = derDecodeLen(buffer,
decodedTag.primitive,
'Failed to get length of "' + tag + '"');
I'll see what I can do. Maybe that part of the build doesn't understand es6 constructs...
Not sure how to reproduce but having the same problem, uglify-js is the one who generates the error.
ERROR in js/vendor.876e7517549e49515645.js from UglifyJs
Unexpected token: name (len) [./~/asn1.js/lib/asn1/decoders/der.js:58,0][js/vendor.876e7517549e49515645.js:37953,6]
Using this uglify-js config:
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
mangle: {
screw_ie8: true,
except: []
},
comments: true,
compress: {
screw_ie8: true,
sequences: true,
properties: true,
dead_code: true,
drop_debugger: true,
unsafe: true,
conditionals: true,
comparisons: true,
evaluate: true,
booleans: true,
loops: true,
unused: true,
hoist_funs: true,
hoist_vars: false,
if_return: true,
join_vars: true,
cascade: true,
warnings: false,
negate_iife: true,
pure_getters: true,
pure_funcs: null,
drop_console: false,
keep_fargs: false,
keep_fnames: false
},
}),
I can reproduce it too now! Had to use -p
flag for webpack to enable uglify. Let's see what's causing it.
Okay, I think I'm going to unpublish the update and do a major bump. It looks like the babel is mandatory now and wasn't mandatory before.
Alright, all is unpublished now. Thank you for reporting. Please let me know if the error persists.
Solved my problems, thanks 👍
Fixed my problem, too. Thanks.
Since I got the latest version, my webpack build now fails.
My dependency tree is