-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Description
Hi,
I'm using vue-cli 3
and typescript to make my own application.
Everything seemed to be fine until I separated my module into parts: template file
and logic file
.
I have a component like this:
- master-layout.component.ts
@Component({
name: 'master-layout',
template: require('html-loader!./master-layout.component.html')
})
export default class MasterLayoutComponent extends Vue {
}
- master-layout.component.html
<div>
<router-view/>
</div>
Actually, when this component was combined into one *.vue
file, it ran smoothly.
But I want to separate the module into 2 parts because in future, code can be longer and longer, therefore, it is hard to track the issue if available.
When I ran the application after changing my code like above, one error was thrown to me:
You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
Can anyone help ?
Thanks,
Metadata
Metadata
Assignees
Labels
No labels