Closed JingzheSun closed 2 years ago
Thank you for pointing this out. We'll revert the package.json line.
If instead of reverting the package.json, if we modified go-module.js to include a default:
export default (typeof global !== "undefined") ? global.go : self.go;
export const go = (typeof global !== "undefined") ? global.go : self.go;
Instead of what it is right now:
export const go = (typeof global !== "undefined") ? global.go : self.go;
Would that work for you? We want to make sure this is proper for module users. Such a change would support any of these:
import go from "gojs";
import * as go from "gojs";
import { go } from "gojs";
We have just released 2.2.5, which should fix this. Please let me know if you continue to have issues.
previous versions allow using default export e.g
import go from "gojs"
but the newly added"module": "release/go-module.js"
only works with named exportimport * as go from "gojs"
.It is expected that both import types are supported among the same minor version. upgrading from 2.2.2 to 2.2.3 should not bring any other issue.