An NPM module offer some extensions in a folder :
gojs
extensions
DebugInspector.js
release
packages.json
Each extensions contain one class without any (es2015) export syntax like :
function Inspector(...) {
}
Inspector.prototype.inspectObject = function(obj) {
}
How to use it with webpack ? I tried a simple export like :
import 'gojs/extensions/DebugInspector.js';
The file is correctly imported and compiled but I can't create a new instance of DebugInspector, the Inspector function is undefined. It's probably, surely a duplicate question but I can't find any example like this code (or I dont use the correct words to search).
This example is not related to the Mike's example because the imported file doesn't support any AMD mechanism.