By rule, you can't specify a getElementById in JavaScript for an element that's not there, so if you have several HTML files you would need to create several .js files to link to each (that's what I've been doing, but maybe an "If" would solve that?)
But if I merge multiple .js files with Webpack, would it automatically do something like that? Would bundle them correctly?
What is the best way to solve this?