AxaFrance / oidc-client

Light, Secure, Pure Javascript OIDC (Open ID Connect) Client. We provide also a REACT wrapper (compatible NextJS, etc.).
MIT License
597 stars 160 forks source link

source maps #741

Closed pinggi closed 2 years ago

pinggi commented 2 years ago

Issue and Steps to Reproduce

The source maps are enabled, but Typescript files are missing in the node_modules/@axa-fr/react-oidc-context/dist folder. The browser is unable to load the file when debugging an error/exception.

Versions

"@axa-fr/react-oidc-context": "^4.5.8" (4.5.8 in yarn.lock)

Expected

The Typescript files are there or source maps are disabled.

guillaume-chervet commented 2 years ago

hi @pinggi ,

Thank you for your issue. Which version of create-react-app are you using? I have some source map available in my dist folder when I build the library:

image

pinggi commented 2 years ago

I use version 5.0.0.

  1. I installed the package: yarn add @axa-fr/react-oidc-context
  2. I noticed there are missing .ts files because the browser I use for debugging couldn't load the .ts files

If I open node_modules/@axa-fr/react-oidc-context/dist/vanilla/oidc.d.ts.map file for example, I can see the source path leads to ../../src/oidc/vanilla/oidc.ts which resolves to node_modules/@axa-fr/react-oidc-context/src/oidc/vanilla/oidc.ts - I don't have the file there (the src folder is missing there).

guillaume-chervet commented 2 years ago

May be it is link to #723 ?

guillaume-chervet commented 2 years ago

Hi, i understand the problem. I will investigate.

guillaume-chervet commented 2 years ago

I just push a fix to include src folder to npm publish. Thank you very much for your issue !

guillaume-chervet commented 2 years ago

I close the PullRequest @pinggi , feel free to reopen it if you need it. Thank you very much for your help !