meteor / todos

The example app "Todos", written following the Meteor Guide
Other
535 stars 367 forks source link

Is code in `imports/ui` really considered browser code by meteor? #165

Closed scharf closed 6 years ago

scharf commented 8 years ago

I followed the structure in this example with my typescript code. It turns out, that typescript complains about the usage of window and document in code that is in the imports/ui directory (see issue 54 on meteor-typescript/meteor-typescript-compiler).

I think the structure should suggest to put all UI related code into imports/client, or am I missing something here?

hexsprite commented 7 years ago

If you're using server side rendering you may wish to have UI code on both server and client.

hwillson commented 6 years ago

@hexsprite nailed it - if you know your UI related code will be client only though, you can definitely put it in imports/client if you prefer. Thanks!