Closed
Description
I use the library as a part of my .js file which is compiled with browserify. The input file for browserify is below and the output file is called bundle.js
:
"use strict";
... // other imports via require(...);
global.JSONLD = require('jsonld');
When I import bundle.js
in .html file which is a part of any Node-RED plugin and do console.log(JSONLD);
, in the console I see an empty object, i.e. Object {}
. But if I import the file in a plain HTML outside of Node-RED environment, the library works correctly, i.e. it's imported as a function.
Other libraries which I import in the same way, in example N3.js and axios, work correctly in both cases.
It's just my guess, but probably the issue is in the way the library is exported.
Metadata
Metadata
Assignees
Labels
No labels