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

Feature/optional chaining #11221

Merged
merged 5 commits into from Aug 7, 2020
Merged

Feature/optional chaining #11221

merged 5 commits into from Aug 7, 2020

Conversation

vankop
Copy link
Member

@vankop vankop commented Jul 23, 2020

What kind of change does this PR introduce?

closes #11186
closes #10227

cherry-pick from #11198

Did you add tests for your changes?

yes

Does this PR introduce a breaking change?

no

What needs to be documented once your changes are merged?

nothing

@webpack-bot
Copy link
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

* @returns {boolean}
*/
module.exports = function (config) {
if (config.mode === "production") return false;
Copy link
Member Author

Choose a reason for hiding this comment

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

Terser does not supports optional chaining yet.
terser/terser#567

nullish coalescing works on try.terser.org, but not optimized.

@sokra sokra force-pushed the feature/optional-chaining branch from 0fbb348 to 1eacb07 Compare August 7, 2020 12:45
lib/ConstPlugin.js Outdated Show resolved Hide resolved
@webpack-bot
Copy link
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

@sokra sokra merged commit 792ce1d into master Aug 7, 2020
@sokra sokra deleted the feature/optional-chaining branch August 7, 2020 17:24
@sokra
Copy link
Member

sokra commented Aug 7, 2020

Thanks

@dreyks
Copy link

dreyks commented Aug 12, 2020

Thanks!

Is there an estimation on when this will be released?

@chenxsan
Copy link
Member

@dreyks
Copy link

dreyks commented Aug 12, 2020

will it be ported to the stable branch or will it only be available in webpack 5?

@alexander-akait
Copy link
Member

@dreyks only for webpack@5

@dreyks
Copy link

dreyks commented Aug 19, 2020

btw terser 5.2.0 is out now with the optional chaining support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants