Open kresnasatya opened 4 years ago
I have implemented dynamic import with page.js and webpack v4 like below. It has worked well.
page('/account', function () {
import(
/* webpackChunkName: "account-view" */
'../components/Account'
)
.then(function (moduleWrap) {
var accountView = moduleWrap.default;
render(accountView);
})
.catch(importErrorHandler);
});
For details, see Georap at GitHub (previously Tresdb) and search for router files under /client/js/routes/
.
Hi, just curious do you have example how to implement dynamic import in page.js?