babel-plugin-import-directory icon indicating copy to clipboard operation
babel-plugin-import-directory copied to clipboard

Not keeping relative paths

Open stevezau opened this issue 7 years ago • 1 comments

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?

stevezau avatar Jul 18 '18 11:07 stevezau

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.

TarVK avatar Aug 18 '18 12:08 TarVK