Hey @Sid,
I believe that’s handled by url-loader
. Here’s the relevant bit from webpack.config.js
:
{
test: /\.(ttf|otf|eot|woff2?|png|jpe?g|gif|svg|ico)$/,
include: config.paths.assets,
loader: "url",
options: {
limit: 4096,
name: `[path]${assetsFilenames}.[ext]`,
},
},
{
test: /\.(ttf|otf|eot|woff2?|png|jpe?g|gif|svg|ico)$/,
include: /node_modules/,
loader: "url",
options: {
limit: 4096,
outputPath: "vendor/",
name: `${config.cacheBusting}.[ext]`,
},
},
The limit
options mean that files under 4,096 bytes will be encoded and inlined.
Hope that gets you started on the right troubleshooting path–I would look around online for other folks using Leaflet with webpack / url-loader and see if you can find someone who has solved this problem already. E.g., maybe this is related? https://github.com/Leaflet/Leaflet/issues/4968#issuecomment-254018065