Skip to content

Conversation

ikalnytskyi
Copy link
Member

We used to pass Joi and its dependencies to Babel because they are
distributing as ES6 libraries, not as ES5. While browsers are usually
good enough to eat this, UglifyJS fails to process non ES5 blocks.

Fortunately, we've upgraded to webpack 4 that comes with new version of
uglifyjs-webpack-plugin that depends on uglify-es module rather than on
uglify-js. The former supports non ES5 blocks so from now on any non ES5
code processed by uglifyjs-webpack-plugin will be transpiled to ES5.

We used to pass Joi and its dependencies to Babel because they are
distributing as ES6 libraries, not as ES5. While browsers are usually
good enough to eat this, UglifyJS fails to process non ES5 blocks.

Fortunately, we've upgraded to webpack 4 that comes with new version of
uglifyjs-webpack-plugin that depends on uglify-es module rather than on
uglify-js. The former supports non ES5 blocks so from now on any non ES5
code processed by uglifyjs-webpack-plugin will be transpiled to ES5.
@ikalnytskyi ikalnytskyi requested a review from lotrien May 20, 2018 09:10
@lotrien lotrien merged commit 18ea8ff into master May 20, 2018
@lotrien lotrien deleted the webpack-remove-babel-hack branch May 20, 2018 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants