Akryum / meteor-vite

MIT License
33 stars 16 forks source link

Re-exports (still) not working in packages #21

Closed red-meadow closed 10 months ago

red-meadow commented 1 year ago

This commit was supposed to fix the bug described in #7 : export { default as XXX } from 'yyy' syntax not working when used in a Meteor package.

But it turns out that - even with this change - the syntax only works if there is at least one normal export (not re-export) in the same file.

How to repoduce:

  1. Run examples/vue project. It starts without errors.

  2. In test:modules/index.js, comment all lines except this one:

    export { default as ReExportedDefault, other, subOther } from './other'

    There is an error in the console.

  3. Uncomment the 1st line: export const A = 'A'. No errors.

My case: I cannot use rdb:svelte-meteor-data package because its index.js contains a single re-export of default export.