Hi, Sorry, I found a typo in my Utils.js tiddler : I wrote export. ... instead of export*s*. ... My bad.
Everything's fine now. Regards FrD Le vendredi 20 juillet 2018 22:32:07 UTC+2, FrD a écrit : > > Hi, > > I've written two js macros, and part of the code is the same. > > So I've put this part in a function (say : myUtilFunction) in another > tiddler (say : Utils.js, application/javascript, and module-type : > library). At the end : exports.myUtilFunction = myUtilFunction; > > Now I'm trying to make this function available int the two macros. > So in the twos macros, before "exports.name = ...", I have : > > var myUtilFunction = require("Utils.js").myUtilFunction; > > It doesn't work, the error message reads : myUtilFunction is not a > function. > > I've already used this way in writing a widget and it worked. Is there a > pb with macros ? > > > Any help welcome ! > > Regards > > FrD > > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikidev+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywikidev@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/be6094c7-d4f9-48fc-9cc2-5278e0f4d637%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.