componentjs / require2

builder2's require implementation
8 stars 3 forks source link

Alias support #2

Closed djanowski closed 10 years ago

djanowski commented 10 years ago

I want to bring support for aliases in builder2. I'd need them here, right?

jonathanong commented 10 years ago

yeah i need to add this, but i'm not sure i want to add this in production. what's your use-case for aliases?

djanowski commented 10 years ago

Only now did I understand that the builder is rewriting my requires to the exact registered versions.

The use case that prompted me to create this issue is that I wanted to require from outside the bundle. But I know that's not super clean, I'll try to change the approach and reopen if necessary.

Thanks.

jonathanong commented 10 years ago

okay. i'm not totally against this. i'm thinking about allowing aliases on a per-component basis. if we alias EVERYTHING people are going to complain that bundles are bloated. we also have to think of ES6 - not sure how to alias ES6 modules when that time comes.