How does vue reference a separate html template file?

  node.js, question

Having just contacted vue, I am currently writing a project to create an html template file independently.

Look at the tutorial, template is usedAddSpelled string, feel so bad.

After that, it is found that vue can read the contents of the < template > tag from the html file inside according to the id and use it as a template.


<template id="project-header-template">
 < a v-link="{ path: '/me'} "> my < /a >
 < a v-link="{ path: '/other'} "> more < /a >


var Header = Vue.extend({
 template: '#project-header-template'

However, it is currently written to the entry file inside.

Because there are many templates, I want to develop one html file for each template like angularjs. But I don’t know how vue refers to an independent html file.

I tried to use it directly in node-webkit.
template: require('./templates/header.template.html'),
The result is wrong:
Unexpected token <
It doesn’t seem to work that way.

Find a way to independent reference html template files like angularjs.
And it is best to avoid packaging during development.