When in production its a good idea to silence the debug level by default as the extra console logs would degrade performance and obscures other logging (errors etc). By having a good default setup it improves the DX of the lib.
Add a const isProduction = process.env.NODE_ENV === 'production' to the top of georaster-layer-for-leaflet.js and then default the global debugLevel depending on it: if (!("debugLevel" in options)) options.debugLevel = isProduction ? 0 : 1;
When in production its a good idea to silence the debug level by default as the extra console logs would degrade performance and obscures other logging (errors etc). By having a good default setup it improves the DX of the lib.
Add a
const isProduction = process.env.NODE_ENV === 'production'
to the top ofgeoraster-layer-for-leaflet.js
and then default the globaldebugLevel
depending on it:if (!("debugLevel" in options)) options.debugLevel = isProduction ? 0 : 1;