Skip to content

Error when using @cardano-sdk/core #536

Closed Answered by mkazlauskas
aryelciu001 asked this question in Q&A
Discussion options

You must be logged in to vote

react-scripts uses webpack and you need a custom config to get it working. See webpack.config.js in our web-extension e2e tests as an example. These are the important options (don't necessarily need all of those for just core package):

{
  experiments: {
    syncWebAssembly: true
  },
  plugins: [
    new NormalModuleReplacementPlugin(
      /@dcspark\/cardano-multiplatform-lib-nodejs/,
      '@dcspark/cardano-multiplatform-lib-asmjs'
    ),
    new NormalModuleReplacementPlugin(/blake2b$/, 'blake2b-no-wasm'),
    new NormalModuleReplacementPlugin(
      /@emurgo\/cardano-message-signing-nodejs/,
      '@emurgo/cardano-message-signing-asmjs'
    ),
    new ProvidePlugin({
      Buffer: ['…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@aryelciu001
Comment options

@aryelciu001
Comment options

@mkazlauskas
Comment options

Answer selected by rhyslbw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants