[feature fix] Webpack fixes

Fixes a couple webpack-related errors on the registration and view file pages.

Moves all JS code to the bottom of page so that modules are loaded after the webpack runtime (in `vendor.bundle.js`) is loaded.