So when I am trying to import class from another javascript file, I am getting error in console like this:
Access to Script at \'file:///home/../.../JavaScri
ES6 modules are subject to same-origin policy. You need to run your script from a local server, open directly the file with a browser will not work.
see here ES6 module support in Chrome 62/Chrome Canary 64, does not work locally, CORS error
file://
requests will not work, but you can run a local webserver (polymer serve, express, etc.) to use HTTP requests instead. You could even use the following Chrome extension to run a local webserver.
https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en