dotmindlabs dotmindlabs - 8 months ago 99
AngularJS Question

Webpack ES6 import of ngJsTree

Hello need to import ngJsTree with webpack on ES6.

npm install ng-js-tree --save

I tried:

import jstree from 'ngJsTree';
or import * as jstree from 'ngJsTree';

but always get:
Module not found: Error: Cannot resolve module 'ngJsTree'

should i use require and how?


If you installed it as ng-js-tree, then it will be available as ng-js-tree.

Therefore try importing as:

import ngJsTree from 'ng-js-tree';