You can use the file loader and adjust the variable [path]:
loaders: [ { test: /\.(png|jpg|svg|ttf|eot|woff|woff2)$/, loader: 'file?name=[path][name].[ext]' // your case: 'file?name=fonts/[name].[ext]' } ... ],
In this case, all associated files will be placed in the "fonts /" folder.
source share