My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Multiple Export from a file JS.

Anand KS's photo
Anand KS
·Apr 11, 2018

I would like to export multiple files from one file like below.

export default CardNew;
export CardBody from './components/CardBody';

With one default export and other exports. But it is throwing error as "Module build failed: SyntaxError". I have seen people using these type of exports and it works. Or is there any plugin to support these type of exports.

Note: I am using React JS