L
L
Leonid2019-12-29 12:30:12
webpack
Leonid, 2019-12-29 12:30:12

How to split Vue code into separate modules in webpack?

Thank you in advance! ;-)
There is a Django project with embedded pages with vue. Moreover, modules on vue perform different tasks on each page.
The project is going to webpack - an article was found on connecting this build system to Django and everything was set up according to it.
The problem is that the article lists one output file for all scripts. As a result, under 2 MB it turns out. And if this is normal for the internal accounting system, then there are a number of pages in which simple contact forms are used to contact visitors. And the resulting js file is already under 2 MB.
Tell me the settings or an article on how to split the file into separate modules? Contact forms in one bundle, CRM in another, etc.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WapSter, 2019-12-29
@stilet69

dev-city.me/webpack-tochki-vhoda

L
Leonid, 2019-12-29
@stilet69

So far, I've made it by calling two different configs ./node_modules/.bin/webpack --config webpack.config_crm.js --watch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question