I have the following structure
components/
index.js
Messages/
index.js
error.jsx
info.jsx
success.jsx
Messages/index.js export the three messages as :
export {Info} from './info'
export {Error} from './error'
export {Success} from './success'
And components/index.js does the following:
import * as Message from './Message'
export {Message}
Is there a way for me to do it without the import?
I am using webpack and Babel with es2015 presets
According to Mozilla's ES2015 documentation https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export you can just do
export * from './Messages';