Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat adding es5 as target for webpack compilation #741

Merged
merged 1 commit into from
Mar 10, 2021

Conversation

vitormalencar
Copy link
Collaborator

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the dev branch for v2.x (or to a previous version branch), not the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

This PR should close #737 #738,

what happened was that once we update to use webpack5 the target option was not specified and the build was created with arrow functions, breaking the es5 builds, by targeting the build we can avoid that.

https://webpack.js.org/blog/2020-10-10-webpack-5-release/#improved-code-generation

@@ -13,6 +13,7 @@ Licensed MIT © Zeno Rocha`;
module.exports = {
entry: './src/clipboard.js',
mode: 'production',
target: ['web', 'es5'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Did you try with ES5 build to validate the issue opened about it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ES-Check: there were no ES version matching errors!  🎉

@vitormalencar vitormalencar merged commit 47f6481 into master Mar 10, 2021
@vitormalencar vitormalencar deleted the feat-fix-webpack-target branch March 10, 2021 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ES6 in distribution
2 participants