I
I
Igor Prokofiev2020-08-07 08:33:10
npm
Igor Prokofiev, 2020-08-07 08:33:10

How to build a complex vue project (with additional modules)? Am I doing it right?

Hello. The question is difficult.

There is a big project written in Vue.js, scss, js. It must be assembled into a web application in order to run in a container. The project also has its own npm module.
The main question is how to collect all this?
What I have already done:
1. I smoked gulp, configured it, everything that is needed is assembled;
2. I smoked webpack, it collects everything else and mimics the code;
3. I smoked npm build and that's where the problem arises.

The problem is in one npm package that comes with the project (in a separate folder). How to install it? npm build crashes on it (can't find it).
Second question - am I building the assembly correctly? gulp + webpack + npm run build? All configs are there.
And the last - where can I read about all this concisely, briefly and succinctly? Any books? Googled, but only scattered articles come across, and I don’t know how to ask Google correctly.

Sorry if this is too stupid, I'm new.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2020-08-07
@Debil1488

The local module can be specified with link:or with file:. In the first case, a symlink is created to the module in node_modules, in the second, the module is simply copied there. In the first case, it may not start for various esoteric reasons, but if it does, it’s more convenient to use it, of course.
If you use not npm, but yarn- more convenient options are added:
1. yarn workspaces : you put several of your modules / applications in one rep, and yarncollects all dependencies into one node_modulesand links the modules used there too. As a result, there is no duplication of files and all modules work with the same libs - which is useful in Dev if you use the extension of third-party modules. Very comfortably.
2. yarn link: this is a purely local feature for development, you do it yarn linkin the root of one module and it is registered globally, after which you do it in another module where you want to use it yarn link "имя"and it is linked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question