Current behaviour
The relative paths of src files in HTML templates cannot be resolved correctly in JavaScript.
const aiHtml = `
<img
class="w-7 h-7 sm:w-10 sm:h-10 rounded-full mr-2 sm:mr-4 shrink-0"
src="../../../assets/images/chat-ai.png"
alt="" />
`;
// or
const aiHtml = `
<img
class="w-7 h-7 sm:w-10 sm:h-10 rounded-full mr-2 sm:mr-4 shrink-0"
src="@images/chat-ai.png"
alt="" />
`;
Environment
- OS: Windows
- version of Node.js: 18.16.0
- version of Webpack: 5.87.0
- version of the Plugin: 1.18.0
Current behaviour
The relative paths of src files in HTML templates cannot be resolved correctly in JavaScript.
Environment