dojo / cli-build-webpack

🚀 **DEPRECATED** Dojo 2 - cli command for building applications
http://dojo.io
Other
4 stars 19 forks source link

Support automatic lazy widget bundling #87

Closed rorticus closed 7 years ago

rorticus commented 7 years ago

Enhancement

When using @dojo/core/load to lazy load a module, we want automatically add the module to its own bundle

Given,

registry.define('my-widget', () => {
    return load(require, './MyWidget')
        .then(([ MyWidget ]) => MyWidget.default);
});

We want cli-build to add MyWidget to it's own bundle using something like,

require(`bundle-loader?lazy&name=${widgetName}!./Widget`);