An easy way to limit the plugin's scope to development/test builds is to use Babel's env option, e.g.: Note that source-maps don't need to be inlined in each file. They can be externalised by using ...