I have this structure
index.html
src/img/image.png
src/js/app.js
src/fonts/font.ttf
src/css/styles.css
For my distribution I would like to build everything into a folder except the html file something like this:
dist/index.html
dist/assets/styles.css
dist/assets/app.js
dist/assets/font.ttf
.....
This is what I'm trying right now but it seems webpack still builds everything inside the assets folder including the index.html
output: {
path: path.join(__dirname, 'dist/Assets'),
filename: '[name].[hash].bundle.js'
},
plugins:[
new HtmlWebpackPlugin({
template: 'src/index.html',
chunksSortMode: 'dependency',
filename: path.resolve(__dirname, './index.html'),
}),
]