Created
September 26, 2019 09:54
-
-
Save marekalgoud/84adc6f504e078ad1cb4ef574b2c4d09 to your computer and use it in GitHub Desktop.
lazyloading script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import(/* webpackChunkName: "article" */ `./pages/article`).then(module => { | |
try { | |
const Article = module.default | |
const article = new Article() | |
article.init() | |
} catch (err) { | |
console.error(err) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment