I have a basic HTML page with a button:
...
When you run the file over webpack, webpack will try not to litter the global scope and so the function will not be made available globally by default.
If you want the function to be accessible outside the scope of he JS file, you should put it in the global scope.
function uclicked() {
// do something
}
window.uclicked = uclicked;
Or just:
window.uclicked = function() {
// do something
}