ktsn / vue-template-loader

Vue.js 2.0 template loader for webpack
MIT License
266 stars 26 forks source link

How to downgrade js in templates? #65

Open Ys-OoO opened 2 months ago

Ys-OoO commented 2 months ago

My template file contains only templates,like:

<div>
    <h1>{{ obj?.attr }}<h1>
</div>

If I use es11 syntax then it will not work in low version browsers. How do I go about downgrading the js in this case?I tried writing the loader and using babel, but babel thinks the file is jsx. Is there any other way? Or does vue-template-loader support syntax degradation?