我在.ts文件上更改的每个代码都会触发浏览器刷新,我不希望它以这种方式工作。我尝试了许多解决方案,比如"vue-ts-loader","vue-hot-reload-api",……,但我没有找到一个好的。你们是怎么解决这个问题的?
发布于 2018-01-07 05:55:21
正如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>`})https://stackoverflow.com/questions/46173610
复制相似问题