Answer the question
In order to leave comments, you need to log in
What is the best way to store templates in Vue.js?
What is the most practical way to build a page with vue.js?
Store the template code in the template variable of the script or describe the framework in HTML initially and hang vue ID on the elements?
The x-template option seems more perverse than anything to me!
Answer the question
In order to leave comments, you need to log in
I agree, separate vue files are the best option. I would choose other options only if you cannot use the collector for some reason.
*.vue files are very convenient - templates, styles and code are in one place (and all with preprocessor support). Fewer open tabs in the IDE, easier to navigate. IDEs are already more or less supported (WebStorm is fine, Visual Studio Code is worse, I don’t know the rest).
Just take some ready-made boilerplate, manually setting up a webpack is not very fun.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question