awslabs / aws-jwt-verify

JS library for verifying JWTs signed by Amazon Cognito, and any OIDC-compatible IDP that signs JWTs with RS256, RS384, and RS512
Apache License 2.0
594 stars 43 forks source link

NextJS TurboPack resolve #node-web-compat #122

Closed rickiesmooth closed 1 year ago

rickiesmooth commented 1 year ago

I'm testing turbopack with the latest version of NextJS (13.3.0) which doesn't seem to support private mappings yet. I was wondering if someone got it to work with a resolve alias?

https://turbo.build/pack/docs/features/customizing-turbopack#resolve-aliases

ottokruse commented 1 year ago

Without trying it, this might work:

module.exports = {
  experimental: {
    turbo: {
      resolveAlias: {
        "#node-web-compat": { 
          browser: "./node-web-compat-web.js",
          default: "./node-web-compat-node.js",
        },
      },
    },
  },
}

A minimal description of steps to reproduce would be nice otherwise

ottokruse commented 1 year ago

Closing for now because unsure how to reproduce