Hello @kartik,
Requiring assets using the file-loader module is the way webpack is intended to be used. However, if you need greater flexibility or want a cleaner interface, you can also copy static files directly using my copy-webpack-plugin. For your static to build example:
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
context: path.join(__dirname, 'your-app'),
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: 'static' }
]
})
]
};
Hope it helps!!
ThanK you!!