A webpack loader can resolve html file use swig engine to html file, there is no need to change filename to swig or others, just html
1.Install npm i html-swig-loader -D
2.Inject <!--swig-->
into your html file which use swig
3.Add 'html-swig-loader' to your html rules
rules: [
{
test: /\.html$/,
use: ['html-loader', 'html-swig-loader']
}
]