babel-plugin-transform-dirname-filename
                                
                                 babel-plugin-transform-dirname-filename copied to clipboard
                                
                                    babel-plugin-transform-dirname-filename copied to clipboard
                            
                            
                            
                        Possibility to make __dirname relative
Hi!
Is it possible to configure this plugin to make __dirname relative to some folder?
If for example I have project root and I want to inject relative file path to the resulting code it would be good to be able to write
console.log('[' + __dirname + '/' + __filename + ']', 'my stuff');
which would then expand to
console.log('[' + 'component/Main' + '/' + Main.js + ']', 'my stuff');
You may be able to get away with using module.filename  (global variable -- doesn't come from this library)
Example input:
console.log(module.id);
Example output:
./src/index.js
Additionally, if you're using Webpack, you can set
node: {
  __filename: true,
  __dirname: true,
},
and it will make it relative from the root directory