Hi, welcome to the forum. The configuration is very basic and general to give you a starting point, but you may want to tweak it a bit in order to install new dependencies. This should work assuming you have installed the dependencies via NPM or Yarn:
entry: {
'./js/app.js': ['./js/app.js', 'jquery', 'bootstrap']
},
For a more elaborated configuration you should take a look to Webpack’s documentation.
It depends. If you’re using a lot of JavaScript, you may want to split vendor’s dependencies from the bundle of your app. The idea of splitting a bundle is mandatory for SPAs, but for MPAs sometimes is better having a big bundle minified and gzipped (if its size isn’t too big) or using a CDN for the dependencies, as it results in less requests needed from the client.


















