meteor/guide

Document how to properly use dynamic expressions with imports

Closed this issue · 5 comments

This has come up several times now in meteor/meteor issues. We should consider documenting how to leverage dynamic expressions with import's. A detailed explanation of how to do this can be found in meteor/meteor#8327 (comment), and meteor/meteor#8744 is an example of one of the recent issues that outline the confusion around this.

Usage on importing core meteor packages and/or atmosphere packages should be mentioned too, see meteor/meteor#8745

Is the current advice for dynamic imports using an expression to use a whitelist?

What would a whitelist look like? Like this?

if (false) {
    import('meteor/foo')
    import('bar')
    import('meteor/baz:baz')
}

i think getting this stuff documented ASAP is really important... i'm willing to help in any way i can

@hwillson would this not be better suited to the API rather than the guide?

@toinevk Yes, I think so! I just wanted to create a placeholder for this idea, so for some reason I picked the Guide repo. I've moved this over to meteor/docs#394. Thanks!