babel-plugin-import-directory
babel-plugin-import-directory copied to clipboard
Not keeping relative paths
Hi,
When importing such as
import plugins from './plugins/**';
The output is
var _index7 = require('plugins/someplugin/somefile');
For some reason, it's not keeping the ./
Any Suggestions?
Seems to be because of the 'path.join' that they use. They should have just added the '/' manually I think. Path.join gets rid of the './' at the start. I might try to fix this properly and make a pull request at some point, But for now I am just fixing it in my local environment. But if you also still have this issue as well, you might be able to do the same now.