How to assign a namespace using ES6 modules? I would like to do this, for example, jQuery does where the namespace is $
, but it does so in the intended way of ES6. All my modules are structured in separate files that export classes / functions / as by default (for example, export default class Pikachu
). How to import it into another (main) file so that the user can access this class using, for example Namespace.Pikachu
,?
I realized that this may be related to the name of the export, but I'm not quite sure how to do this. Any help please?
source
share