M
M
mikoniyan2019-09-12 16:31:40
JavaScript
mikoniyan, 2019-09-12 16:31:40

How to properly organize a javascript bundle?

There are multiple pages and each page has its own unique scripts.
For example:

  1. Home - has a slider script
  2. Contact - has a script for processing feedback forms
  3. Shop - has a product sorting script
  4. Services - has a script for calculating the cost of services

jQuery, owlcourusel, modernizer, bootstrap are also connected ...
At the moment, I collect all these scripts in 1 bundle.min.js
Question: What is the best way to collect them, advise who can offer what?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yan Markov, 2019-09-12
@mikoniyan

Try to create your own entry point for each page, and put global scripts that work everywhere in global.js and import it on each page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question