S
S
skuvaWeb2019-02-01 14:37:53
JavaScript
skuvaWeb, 2019-02-01 14:37:53

How to properly implement code separation when working with webpack?

I am doing my first project on webpack, an online store on Bitrix. After talking with the back, a problem arose. Back needs the code to be broken into modules to load them only as needed. But after all, webpack assembles the code into bundles, after which it is impossible to work with it. How to do it correctly in conjunction with webpack? Whose task is it to optimize the code in this way?
I read about dynamic loading of modules in webpack. How does he implement it? What browser support?
As I understood it: It is necessary to create an entry point for each page, and when and what js code to load is the task of the frontend?
Explain how.)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question