NorthwoodsSoftware / GoJS

JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.
http://gojs.net
Other
7.7k stars 2.86k forks source link

Visual Studio bundling error #212

Closed GeorgeMorozov closed 3 months ago

GeorgeMorozov commented 4 months ago

I have a project on Framework 4.8, when I include your source through the "bundles system" built into Visual Studio I get an error: image

The problem started in the version 3.0.1 In version 2.3.17 everything worked correctly.

simonsarris commented 4 months ago

I have no idea why this might happen. Does it happen if you only bundle GoJS, and none of the others?

GeorgeMorozov commented 4 months ago

This bundle contains files:

but they have not changed, only the version of your file go.js has changed

PolylineLinkingTool.js. from this example https://gojs.net/latest/samples/PolylineLinking.html Figures.js. from this example https://gojs.net/latest/intro/shapes.html

WalterNorthwoods commented 4 months ago

I bet the problem is that your PolylineLinkingTool.js is an old one that still depends on the Diagram.inherit static function, which can no longer exist in GoJS v3+. I suggest that you copy that file from the create-gojs-kit package, either from extensions/ if just loading from a script tag or from extensionsJSM/ if importing an ES module.

Please read https://gojs.net/latest/changelog.html, and especially https://gojs.net/latest/changelog.html#Changes.

GeorgeMorozov commented 3 months ago

I removed the "PolylineLinkingTool.js", but it had no effect. I had to stop minifying the bundle by calling: scriptBundle.Transforms.Clear();

WalterNorthwoods commented 3 months ago

You have a work-around, so I'll close this issue.

You may want to try with the latest version: 3.0.4