Sign in
Log inSign up

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

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct