simondevyoutube / Quick_3D_MMORPG

Absolutely 100% unsupported, and full of infuriating bugs.
MIT License
448 stars 173 forks source link

Why IIFE? #11

Open gamedevsam opened 2 years ago

gamedevsam commented 2 years ago

In your code you wrap all exported classes in an immediately invoked function expression. But you're also using ES Modules.

Why do this?

export const something = (() => {
    class Something {}
    return { Something: Something };
})();

Instead of this?

export class Something {}