b.html also depends on c, so it includes the following:
<require from='./c'></require>
In this case, if the timing is right, I get an error while importing c:
ERROR [app-router] Error: Template markup must be wrapped in a <template> element e.g. <template> <!-- markup here --> </template>
The error manifests in aurelia-pal-browser.js in createTemplateFromMarkup, but that is only because it is passed an empty markup parameter to the method.
The core appears to be in WebpackLoader._import. On one call, the result of the require is the actual content of c.html, but on the other, it is just an empty object. That in turn has no <template> child and fails.
I have a file
a.html
that depends onb
andc
:b.html
also depends onc
, so it includes the following:In this case, if the timing is right, I get an error while importing
c
:The error manifests in aurelia-pal-browser.js in
createTemplateFromMarkup
, but that is only because it is passed an emptymarkup
parameter to the method.The core appears to be in
WebpackLoader._import
. On one call, the result of the require is the actual content ofc.html
, but on the other, it is just an empty object. That in turn has no<template>
child and fails.The core line appears to be here https://github.com/aurelia/loader-webpack/blob/master/src/index.js#L78
Note that if I run it through a browser debugger and step through each time, then the issue goes away, which implies some kind of timing issue.