I'm working on an angular application which requires html
files to be extracted as plain HTML files and at same time should check for any <img src="...">
to require those images (as assets). In addition, images are based upon root path (so /images/something.png
), they need to be resolved relatively to webpack context
setting (the base path).
How can I achieve this? Can't get html-loader to play nicely with file-loader. Since the former outputs a JS file (with the require
statements) and the latter expects a plain HTML file.