What happens here is that the \ui-select is being interpreted as a Unicode character marker, due to \u.
In our case, the JavaScript/TypeScript code will always use the / path separator (e.g. formly/template/ui-select.html) when accessing the template from code, regardless of the execution environment. As a consequence, even if \u were not causing issues, the template cache would always fail to retrieve the appropriate value.
We've traced the root cause to this line:
let filename = path.relative(htmlRootDir, file);
where module "path" provides relative URLs using the system separator.
We haven't found an option that would allow us to specify that path fragments (e.g. formly\template\ui-select.html) in the file generated by angular-templatecache-webpack-plugin should use the Unix separator (/) instead of the Windows one (\). This issue is for requesting that such an option be added.
I'm even wondering if the path separator could not just be "forced" to the Unix one.
We are encountering the following error on our development workstations running Windows:
Looking at our source code, we realized that the error was thrown on this line of the file we've specified in
outputFilename
:$templateCache.put('formly\template\ui-select.html', …
What happens here is that the
\ui-select
is being interpreted as a Unicode character marker, due to\u
.In our case, the JavaScript/TypeScript code will always use the
/
path separator (e.g.formly/template/ui-select.html
) when accessing the template from code, regardless of the execution environment. As a consequence, even if\u
were not causing issues, the template cache would always fail to retrieve the appropriate value.We've traced the root cause to this line:
where module "path" provides relative URLs using the system separator.
We haven't found an option that would allow us to specify that path fragments (e.g.
formly\template\ui-select.html
) in the file generated by angular-templatecache-webpack-plugin should use the Unix separator (/
) instead of the Windows one (\
). This issue is for requesting that such an option be added.I'm even wondering if the path separator could not just be "forced" to the Unix one.