Let’s say I have a folder with an image file and an index file (it acts like a public API), is there a way to reexport the image with another name?.
The folder structure is as following:
└── assets/
├── index.ts
└── facebook.png
Is there a way to reexport the image file with a name?, like the following:
index.ts:
export * as FacebookLogo from "./facebook.png"
>Solution :
In the index.js file of your api folder…
import FacebookLogo from './facebook.png';
export {
FacebookLogo,
/** other exports */
};