import-js icon indicating copy to clipboard operation
import-js copied to clipboard

node_modules are ignored

Open GCorbel opened this issue 7 years ago • 4 comments

I'm working on an ember project and I installed the addon ember-simple-auth. I create the app/authenticators/application.js with this :

export default Devise.extend({
});

Devise should be resolved asimport Devise from 'ember-simple-auth/authenticators/devise'; but it gives No JS module to import for Devise`.

The file is located in ./node_modules/ember-simple-auth/addon/authenticators/devise.js and the addon is a "devDependency".

It works if I create an app somewhere in my app with :

const Devise = {};
export { Devise };

Here is my .importjs.js file :

module.exports = {
  excludes: [],
  importDevDependencies: true
}

There is nothing in logs.

Is there a bug or did I miss something?

GCorbel avatar Apr 06 '18 06:04 GCorbel

I've been having similar issues, and haven't had the time to debug it properly

coagmano avatar Apr 06 '18 06:04 coagmano

Right now, only the top level exports are found for package dependencies. We've discussed adding support for finding exports within subdirectories of package dependencies, but no code has yet been written in this area. See https://github.com/Galooshi/import-js/issues/344

trotzig avatar Apr 06 '18 08:04 trotzig

Any updates on this issue?

GCorbel avatar Sep 21 '18 16:09 GCorbel

@GCorbel nothing yet. If you wanted to get involved, #344 is a good place to discuss ways to implement this.

trotzig avatar Sep 21 '18 20:09 trotzig