I get an "Unexpected identifier" error when I try to import a class.
I'm importing class this way:
Class to be exported (WindowManager)
export default class WindowManager {
sayHello() {
console.log('hello')
}
}
Class which imports (Main)
import WindowManager from './handlers/WindowManager';
WindowManager = new WindowManager();
WindowManager.sayHello()
Folder hierarchy
Class which imports (Main) > handlers > Class to be imported (WindowManager)
Extra info
Throws the error at this line of code (Main)
import WindowManager from './handlers/WindowManager.js';
I've looked into Unexpected Identifier {classname} when importing JavaScript Class into another Class and make changes and still nothing