Webpack bundling the lib with html files as single js

I am currently writing a js library which needs to inject some html code into consuming website. I dont want to use string templates in my js code so I have created different html files in the src directory and loading them with html-loader plugin so I can use directly in my code as string templates. I need to to bundle this lib as a single js which can be used via single cdn link but when I build the project I see that the html files still imported from the src directory in the bundle file. Can I achieve to include these html files as strings in my final js file using webpack?

Thank you

Source: Ask Javascript Questions