Meteor client side require

Hello guys,

What is difference between require(StringPath) and require(variable)

I have some problem:
For example:
require '../../ui/pages/main.coffee' it works
But
path = '../../ui/pages/main.coffee'
require path
Doesn’t work, and I get console error
Error: Cannot find module '../../ui/pages/main.coffee'

What’s going on ?

If you don’t set a static string in your require, the meteor compiler will not know that your file needs to be included in your app (especially if it is in an imports directory).

Thx you, you are right! I learned the import source