Closed stazcp closed 3 years ago
So code works fine when running gatsby on develop but when I run build I get this issue.
Can't import the named export 'Crypto' from non-EcmaScript module
At #55 there is a solution providing the pkg with a Lambda layer. I also found that packages can be imported as a script? https://www.gatsbyjs.com/plugins/gatsby-plugin-load-script/
Any recommendations for Gatsby users? What workarounds do you recommend?
Solution: Imported script conditionally instead of installing the SDK.
So code works fine when running gatsby on develop but when I run build I get this issue.
Can't import the named export 'Crypto' from non-EcmaScript module
At #55 there is a solution providing the pkg with a Lambda layer. I also found that packages can be imported as a script? https://www.gatsbyjs.com/plugins/gatsby-plugin-load-script/
Any recommendations for Gatsby users? What workarounds do you recommend?