Hi Danielo,

Thank you for your help!

This was also my first thought. Then I saw that the vis.js designers have a 
switch-case implemented that decides how to export the object based on 
different scenarios.

function webpackUniversalModuleDefinition(root, factory) {
        if(typeof exports === 'object' && typeof module === 'object')
                module.exports = factory();
        else if(typeof define === 'function' && define.amd)
                define(factory);
        else if(typeof exports === 'object')
                exports["vis"] = factory();
        else
                root["vis"] = factory();

When I build a wiki and create a single tw-file (do you call this 
standalone?), I have to access the library like this:

var vis = require("$:/plugins/felixhayashi/vis/vis.js");

which corresponds to (am I right?)

module.exports = factory();

What didn't work and caused the error was:

var vis = require("$:/plugins/felixhayashi/vis/vis.js").vis;

because I initially thought the following is used to export:

exports["vis"] = factory();

But thanks, your suggestion was helpful!

Regards
Felix

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to