我在.ts文件中更改的每个代码都会触发浏览器刷新,我不希望它以这种方式工作。我尝试了许多解决方案,例如" vue-ts-loader"," vue-hot-reload-api",...但是我找不到好的解决方案。你们是如何解决这个问题的?
答案 0 :(得分:0)
像Suresh Velusamy所说:试试github.com/ducksoupdev/vue-webpack-typescript。 它开箱即用。
不要求模板文件,只需将模板内联即可。工作正常。
@Component({
template: `<div class="container content">
<div class="row">
<div class="content col-md-4">
<h1>
<strong>Thank you the fish
<span class="text-primary package">{{package}}</span>
</strong>
</h1>
<p>This project is running in
<strong class="mode">{{mode}} mode</strong>
</p>
<p>Make sure to follow the project on
<a :href="repo">GitHub</a> to stay up to date with the latest releases,
or contribute to the project by opening an issue
or making a pull-request!</p>
</div>
</div>
</div>`})