M
M
Mikhail Smirnov2020-09-30 14:56:14
Vue.js
Mikhail Smirnov, 2020-09-30 14:56:14

How to organize the structure of vue.js applications?

Good afternoon!

There is a site on Bitrix. It is required to make several applications on vuejs. At the moment there is a chat, you need to make another personal account, how to organize the structure of the components.

The chat components are located in the assets folder, the component is connected in the app.js file and all its components are in the chat folder, for my personal account I want to do this: connect an additional personal account component there and register routes in route.js, for the components make a folder for example / personal. Am I going to do the right thing? It turns out that all applications will be in the same app.js file, will it eventually be overloaded if there are more such components in the future.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2020-09-30
@fortoster82

succeed.
collect the common for all pages in one file, which is always included.
and what is specific only for specific pages you collect in separate files and connect them only on these pages.
the structure here does not play royally at all - common sense and assembly rules play royally.

V
Vladimir Dremuchy, 2020-10-08
@dremchee

Vue CLI can assemble web components and libraries separately, they can also be connected anywhere on the page. You can consider this option.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question