@babel/plugin-transform-template-literals

    In

    Out

      1. npm install --save-dev @babel/plugin-transform-template-literals

      Without options:

      1. {
      2. "plugins": [
      3. [
      4. "@babel/plugin-transform-template-literals",
      5. {
      6. "loose": true
      7. }
      8. ]
      9. }
      1. babel --plugins @babel/plugin-transform-template-literals script.js

      boolean, defaults to false.

      1. // babel.config.json
      2. {
      3. "assumptions": {
      4. "mutableTemplateObject": true

      When mutableTemplateObject is true, tagged template literal objects aren’t frozen. All template literal expressions and quasis are combined with the + operator instead of with String.prototype.concat.

      In

      1. `foo${bar}`;

      Out