file-loader support json file

JavaScript
{
   type: 'javascript/auto',
   test: /\.json$/,
   use: [ 'file-loader' ],
   include: /\.\/config/  // for e.g, but better to only copy particular JSON files (not all)
}            {
                type: 'javascript/auto',
                test: /\.json$/,
                use: ['file-loader'],
                include: /\/dir\/.*\.json$/,
                options: {
                    name: 'static/json/[name].[hash:8].[ext]',
                }
            },

Source

Also in JavaScript: