Akryum / meteor-vite

MIT License
34 stars 19 forks source link

Fix reserved keywords #29

Closed JorgenVatle closed 1 year ago

JorgenVatle commented 1 year ago

⚠️ This pull request depends on some changes proposed in #28

Just a quick hotfix for an edge-case where modules exported with module.export({ default: ... }) would be invalidly formatted in the final build.

image

ℹ️ This issue only seems to occur when explicitly importing AccountsBase. Implicit imports aren't affected as far as I'm aware.

// accounts-base v2.2.3
// packages/accounts-base/client_main.js   
module.export({
  Accounts: () => Accounts,
  AccountsClient: () => AccountsClient,
  AccountsTest: () => AccountsTest,
  default: () => exports
});

✅ This will now be converted into a normal default export:

export default m2.default