0

I have multiple external javascript files and I want to link some file to another files. For example: I want to link variable.js file to main.js file and main.js to config.js file etc In config.js file I also want to link jquery and some other 3rd party js files. I know in html page I can link the files one after the other but there are lot of flies and it's looking bad so I want to put the links inside external js files. Is there anyway to do that?

Ask
  • 3,076
  • 6
  • 30
  • 63
  • You may want to modularize your JavaScript files. – kit Jun 27 '18 at 09:44
  • Possible duplicate of [How do I include a JavaScript file in another JavaScript file?](https://stackoverflow.com/questions/950087/how-do-i-include-a-javascript-file-in-another-javascript-file) – Mattia Jun 27 '18 at 09:46

1 Answers1

1

You could use webpack. Look at there https://webpack.js.org/ . Or search in youtube some lessons. It's a module bundler, help you to use ES6 features. One of them are import and export commands, which including external files from one to other