DEV Community

John Milner
John Milner

Posted on

Is it possible to build an application with Webpack that uses XHR to load pages of the site? If so, which plugins do you use?

Top comments (4)

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

Have you tried dynamic import?

Collapse
 
johnmilner33 profile image
John Milner

Thanks for the info! Have you implemented this before? Could you share a Github Gist? I am still doing research on this.

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

await import(RELATIVE_PATH) is the syntax.

Webpack knows.

Thread Thread
 
johnmilner33 profile image
John Milner

Thank you for the info! I will check this out😎🤓