Vanilla JS implementation with RequireJS