Open alxmhe opened 5 years ago
Hm, it's in a try/catch for that reason. You might be able to tell your compiler to ignore it. Any suggestions on how to fix this otherwise? The idea is that the Meteor connection is the default. I could also try to check the Meteor
global object but kinda liked the "official" import statement.
I found this https://github.com/maxnowack/meteor-globals/blob/master/src/checkMeteor.js Not sure if it's the way to go.
Could it be done with dynamic imports? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports
When building a front-end app (eg. Create React App) with apollo-link-ddp, the compiler cannot find the package meteor/meteor and throws a warning.
https://github.com/Swydo/ddp-apollo/blob/206248064d19072e83e61844944d972442b4efb3/packages/apollo-link-ddp/src/client/apollo-link-ddp.js#L18