1

My index.js in a given directory exports several things like this:

export * from 'fileOne';
export * from 'fileTwo';
export * from 'fileThree';

I want to name space the stuff from file4, something like this:

export { default as mockStuff } from 'file4';

OR

export { * as mockStuff } from 'file4'

I've even tried (and various combinations):

import * as mockStuff from 'file4';
export mockStuff

How do I do this?

Adam Jenkins
  • 51,445
  • 11
  • 72
  • 100

1 Answers1

2

I think this is what you're looking for:

import * as mockStuff from "./file4";
export { mockStuff };
Dor Shinar
  • 1,474
  • 2
  • 11
  • 17