2017-04-12 11 views
0

私は、私のvueコンポーネントを書くためにhtml-loaderを使います。 例: 'vue'からVueをインポートします。vue-loaderを使用しないvue-routerでvue-hot-reload-apiを使用するにはどうすればよいですか?

VUE-ローダーなしVUE-ルータとVUEホットリロード-APIの使用方法の場合
import template from './index.html'; 

export default { 
    template, 
    data() { 
     return { 

     }; 
    } 
}; 

、?
html、css、jsを1つのファイルに結合したくないので、別々に書きたいと思います。

答えて

0

あなたはこの方法では、これらのファイルを分離することができます:

<!-- my-component.vue --> 
<template src="./my-component.html"></template> 
<script src="./my-component.js"></script> 
<style src="./my-component.css"></style> 

出典:VueJS: What About Separation of Concerns?

関連する問題