Closed Vheissu closed 8 years ago
@Vheissu Has this been addressed with the latest webpack setups?
@EisenbergEffect The issue is that Webpack can't work with dynamic imports. I actually wrote a solution using inlineViewStrategy which achieves dynamic loading without needing to define your imports upfront. http://ilikekillnerds.com/2016/04/loading-html-url-endpoint-aurelia-using-webpack/
I have a custom element which loads HTML from a server endpoint. In the standard es-2016 and TypeScript skeletons this functionality works fine. However, using the Webpack starter, specifically the loader, due to the way dependencies are resolved with a map, you can no longer do this.
HTML:
Javascript:
The offending part of the loader appears to be this:
It assumes if it is not in the dependency map (and being a remote resource it would not be) then it should throw an error. This is completely different to how the standard loader handles these kind of things.