0

I want to use many third party JS libraries in my application. Application is built using ES5. Currently the application contains 14 html files. All files show different content but same third part JS library is required by all HTML files. Is there a way to organise imports and avoid redundancy of including these libararies in all html files?

user6754
  • 71
  • 1
  • 8
  • Yes, use a module bundler like [webpack](https://webpack.js.org/). – str Feb 12 '18 at 15:15
  • 1
    You can use a template engine like Jade( http://jade-lang.com/) – Hyyan Abo Fakher Feb 12 '18 at 15:16
  • Or a complete everything-included framework like [Ruby on Rails](http://rubyonrails.org/)... – devius Feb 12 '18 at 15:18
  • @devius Adding a backend framework just to simplify adding JavaScript files is a little overkill, don't you think? – str Feb 12 '18 at 15:27
  • I do, but the question asked if there was a way.... not if there was a way using only client-side technologies or using the least amount of third-party code possible... which means it's a bad question to begin with since the correct answer is: Yes. – devius Feb 12 '18 at 15:29
  • Sorry for the mistake. I am bit confused, isn't bundlers and transpilers for ES6? – user6754 Feb 12 '18 at 21:06

0 Answers0