new ClosureCompilerPlugin({
compiler: {
language_in: 'ECMASCRIPT5',
language_out: 'ECMASCRIPT5',
compilation_level: 'SIMPLE'
},
concurrency: 3,
});new ClosureCompilerPlugin({
compiler: {
language_in: 'ECMASCRIPT5',
language_out: 'ECMASCRIPT5',
compilation_level: 'ADVANCED',
create_source_map: true,
externs: 'node_modules/google-closure-compiler/contrib/externs/jquery-1.9.js'
},
concurrency: 3,
});Awesome. I hadn't tried this yet.
The error message you are showing in the console doesn't look like jQuery - more like a testing framework?
Compiling that would take different externs as well.
externs: 'node_modules/google-closure-compiler/contrib/externs/jquery-1.9.js'I'm assuming it looks well formatted because you are using a source map.
create_source_map: falseAre you referring to the Webpack ClosureCompilerPlugin?
Actually the following screenshot suggests that it is infact JQuery, unless I am misunderstanding something?
jQuery.each(jQuery.expr.match.bool.source.match (I am very confused about when and why I need externs, can you please explain or link me to some documentation? The only reason I tried to add an extern for JQuery was because I saw the above error and I thought adding the following would fix that.
That's not standard jQuery - that looks like assertion library added code.
I just answered an almost identical question on StackOverflow this week: http://stackoverflow.com/a/35121355/1211524
/**
* @param {Object} collection
* @param {function((number|string),?)} callback
* @return {Object}
*/
jQuery.each = function(collection, callback) {};