Hello. I am writing a Meteor Package named myPackage with relatively deep folder structures:
/client
/charts
/standard
/myChart.js
/lib
/utilities
/myUtility.js
Now, I am in /client/charts/standard/myChart.js, and I want to import a symbol from /lib/utilities/myUtility.js. I have two options here:
-
import myUtility from '../../../lib/utilities/myUtility.js';- relative -
import myUtility from 'meteor/myPackage/lib/utilities/myUtility.js';- “absolute”, since a leading/does not work in a package context.
The second option reads much better for me. However, i am not sure of any non-obvious implications of this. Maybe it’s not safe (could be deprecated?) to import a package file from the meteor/* namespace from the same package itself?
I’d appreciate some opinions. @sashko @benjamn maybe you can give some advice based on your technical knowledge?
Thanks for your time!