Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
In my particular case, I've tried both of the followings, they all work, wonder the underlying differences between them.
// echarts v5.0.0
export * as ECharts from 'echarts/lib/echarts.js'
export { default as ECharts } from 'echarts/lib/echarts.js'
babel.config.js
module.exports = {
// "@vue/cli-plugin-babel": "~4.5.0",
presets: ['@vue/cli-plugin-babel/preset'],
–
–
This one exports all named exports and default export from foo
as bar
:
export * as bar from 'foo'
This one only exports default export from foo
as bar
:
export { default as bar } from 'foo'
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.