3

I am new to Vue.js, and I'm a little confused about how to use Vue.js in a non-spa project. In my case, I'm going to use JSF for my front-end, and I want to have some components just like button, filter and so on that can be used on different pages. Is there any tool that can convert .vue to pure .js so that I can include the .js in my jsf page? And the most important thing for me is, is there any tutorial or document about non-spa use that I can refer to?

1
  • There is no need to use single file components (.vue files). The best getting started tutorial is the documentation itself. vuejs.org/v2/guide/#Getting-Started Commented May 13, 2017 at 17:33

1 Answer 1

3

The beginning of the Vue.js guide should explain this type of use. The .vue files are for convenience. You can still create Vue components in a regular .js file. For example (from the Vue.js guide):

Vue.component('todo-item', {
  template: '<li>This is a todo</li>'
})
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.