Skip to content

Instantly share code, notes, and snippets.

@jtallant
Created February 22, 2021 18:11
Show Gist options
  • Save jtallant/e96671ab3a5652d2d15d20bb98fb05b1 to your computer and use it in GitHub Desktop.
Save jtallant/e96671ab3a5652d2d15d20bb98fb05b1 to your computer and use it in GitHub Desktop.
Importing ES6 Classes

/js/AppLazyLoad.js

export default class AppLazyLoad {
    init() {
        console.log('do lazy load work');
    }
}

/js/app.js

import AppLazyLoad from './AppLazyLoad';

let appLazyLoad = new AppLazyLoad();

appLazyLoad.init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment