DEV Community

loading...

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?

johnmilner33 profile image John Milner ・1 min read

Discussion (4)

pic
Editor guide
Collapse
patarapolw profile image
Pacharapol Withayasakpunt

Have you tried dynamic import?

Collapse
johnmilner33 profile image
John Milner Author

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 Author

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