-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Webpack Prefetch #163
Comments
That's a good suggestion.
|
For vNext, we don’t need this plugin, so likely this is a vCurrent only plugin…and likely only for Webpack as other scenarios have not yet come up. We could add a generic options property to support this. I’ve got no problem with that. We’re definitely open to PRs. |
Hi @namelos If you are using webpack 4+, use vnext (check these issues here and there) |
I'm submitting a feature request
We're porting a reasonably sized repo (the Aurelia app takes 100k sloc) from AureliaCLI (vanilla RequireJS / Gulp) to Webpack with this Plugin, I made everything works already (Many thanks for the plugin itself and the helpful yet brief wiki!).
We had some hand-rolled solutions that would prefetch with RequireJS bundles before because the loading speed is kind of essential to us, and Webpack support this already:
The approach is just a dynamic import with magical comments. However, with Aurelia, I could only import modules with
PLATFORM.moduleName('./foo-module', 'foo-chunk')
.I tried to figure out if there's a straightforward way to do it. But if I get it right, It seems the IncludeDependency only support two arguments: the module name and the chunk it belongs to.
Is there any way to achieve this? Furthermore, there seem to be some other useful options like preload could be expressed with the magical comment, is it possible to support those with
PLATFORM.moduleName
? Could the behavior and lazy loading share with the<require></require>
in templates?Thank again for the great plugin.
Expected/desired behavior:
The text was updated successfully, but these errors were encountered: