uglifyjs-webpack-plugin@^0.4.6 and uglifyjs-webpack-plugin@^1.1.0 both in use #3973
Closed
3 tasks done
Labels
!deprecated-label:bug
Deprecated label - Use #bug instead
Superset version
commit 84a7730 - master branch
Expected results
Compile javascript containing ES6 constructs successfully using uglifyjs-webpack-plugin^1.1.2
Actual results
UglifyJs produces the following errors:
Steps to reproduce
The first error is being caused by this line of code:
if (new.target == ConceptRegistry) {
The second error is being caused by this line of code (it's actually the same):
if (new.target == ConceptRegistry) {
This code runs just fine, but the uglification script is having some trouble with it. I expect this is because this syntax was only introduced recently (ES6). The uglification plugin version 1.0.0 and up should support this. The latest version of superset has version 1.1.0 configured. In my problem solving process, I have upgraded this to version 1.1.2 to see if this changes things (it does not). Thus, the package.json is set up as follows:
devdependencies{ "uglifyjs-webpack-plugin": "^1.1.2" }
However, in the yarn.lock file I am finding this:
So, there is a dependency to the new version of the uglification plugin, which supports my syntax, and an older version which does not. Since I am seeing errors, I am guessing the latter one is used at the moment. I have not yet found the configuration setting that is managing this. Is this behaviour intentional, or is this a bug? Where can I find the additional configuration that I am currently still missing?
The text was updated successfully, but these errors were encountered: