When adding this component to a new next.js application I got the following compile error:
SyntaxError: Cannot use import statement outside a module
After a lot of digging around I found this GitHub Issue describing a similar problem when using microbundle.
The suggested solution to change the "export" value in the package.json to the following worked for me
"exports": { "import": "./dist/react-cytoscape.modern.js", "require": "./dist/react-cytoscape.js" },
However, I'm completely unfamiliar with microbundle, @akx would u mind briefly looking into this if it makes sense to update the package.json with this code snippet?
When adding this component to a new next.js application I got the following compile error:
SyntaxError: Cannot use import statement outside a moduleAfter a lot of digging around I found this GitHub Issue describing a similar problem when using microbundle.
The suggested solution to change the "export" value in the package.json to the following worked for me
"exports": { "import": "./dist/react-cytoscape.modern.js", "require": "./dist/react-cytoscape.js" },However, I'm completely unfamiliar with microbundle, @akx would u mind briefly looking into this if it makes sense to update the package.json with this code snippet?