ngtools AoT RELATIVE vs ABSOLUTE templateUrls
I'm blocked using AoT because of unit tests. If unit tests do not support AoT, how should my source code look????
I had to change my source code to have relative urls everywhere for each component's style and template url. that's source code changes that were required to run the app with AoT (as far as I understood).
so do I now need another set of source code with absolute paths to run the unit tests? Or how do I run with relative template urls for the app and absolute template urls for unit testing, hopefully I dont need to have both urls in the source code?
as far as repro steps, I think you have foreseen my problem. i am trying to unit test with relative (aot) urls in the source code. but what's the trick here without 2 urls in the source code? (absolute urls for jit unit tests and relative urls for aot production)
The CLI supports (and uses by default) relative paths for both AOT and JIT. If you are not using the CLI and rather a custom webpack configuration you may need to adjust your configuration. An ejected Angular CLI config could potentially be used as a base. Outside a defect or feature request for the CLI or the related webpack loader and plugins, a site such as StackOverflow is probably a more appropriate venue to discuss custom webpack configurations.
If the project is using the CLI, please re-open the issue and provide the information contained within the issue template so that further assistance can be provided.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.