component-compiler-utils icon indicating copy to clipboard operation
component-compiler-utils copied to clipboard

Allow for different transpilers than vue-template-es2015-compiler

Open thisredone opened this issue 6 years ago • 2 comments

Specifying a different transpiler than the current vue-template-es2015-compiler would add the ability for code inside the templates to be processed the same (or a similar) way to the code from <script>.

For example there are outstanding proposals to the ecmascript that currently can be used through babel plugins[1] but they won't work inside the template expressions since they don't follow the same compilation path.

[1] https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining

thisredone avatar Jul 13 '19 22:07 thisredone

Here is a solution if you are using a bundler which supports resolutions in package.json

{
  "resolutions": {
    "vue-template-es2015-compiler": "npm:[email protected]"
  }
}

NikhilVerma avatar Mar 17 '22 18:03 NikhilVerma

Here is a solution if you are using a bundler which supports resolutions in package.json

{
  "resolutions": {
    "vue-template-es2015-compiler": "npm:[email protected]"
  }
}

VERY NICE!

hejun200613224 avatar Jan 22 '24 03:01 hejun200613224