-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Using Template literals (Template strings) #557
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... good. Template literals easiest way to use than interpolaric expressions.
Maybe we push this changes only in v7.x? Because ES2015 needed to compatability with template literals, as I see from docs. But it seems nodejs v6.x supported template literals: https://node.green/#ES2015-syntax-template-literals. And NexT v6.x still partially support IE, but Template Literals not supported by IE: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Browser_compatibility I think need to push it to v7.x from tomorrow. What you think? And separated bugfix can be pushed to v6.x also. P.S. That's why need to split pull request via stash / pop git features. It's better to do 2 pulls / 2 pushes / 2 branches, than 1 big mixed pull. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you to separate bugfix from this pull and make additional pull with bugfix only for push it in v6.x and v7.x in future?
Sure, I'll make another pull request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will v7 branch.
What to do now? |
Now need to create a plan for:
Need to create new issue with suggests on it. |
If all done here, «Squash and merge». |
Done |
@stevenjoezhang Is there any reason to use template literals in client side script without babel? |
@maple3142 it seems IE only not support literals: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Browser_compatibility |
@maple3142 I don't think it's a problem. ES6 was released about 4 years ago, it's supported by most browsers. |
The problem is |
|
Hope this would help: mishoo/UglifyJS#3285 |
@ivan-nginx I don't use it, because I use my own build script instead. @stevenjoezhang I know that es6-aware minifiers does exist, but why do NexT need to use template literals? |
So, mb cleant-side scripts don't need literals? |
@maple3142 reverted via #590. |
* Format code * Update lean-analytics.swig * Update note.js
Revert reverted via #1023. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number(s): N/A
What is the new behavior?
Description about this pull, in several words...
How to use?
In NexT
_config.yml
:Does this PR introduce a breaking change?