LearningProcesss / boardgamegeekjsclient

Typescript written API wrapper for Boardgamegeek XML2 API
MIT License
18 stars 6 forks source link

Include source maps in node package #37

Closed rgembalik closed 1 year ago

rgembalik commented 1 year ago

Any chance for source maps to be included in the npm package?

Currently, when used with React, I get a ton of warning messages like this:

Failed to parse source map from 'path\to\project\node_modules\boardgamegeekclient\dist\src\dto\dtoparser\concrete\BggFamilyDtoParser.ts' file: Error: ENOENT: no such file or directory, open 'path\to\project\node_modules\boardgamegeekclient\dist\src\dto\dtoparser\concrete\BggFamilyDtoParser.ts'

While it's nothing substantial, it does obscure true errors if they appear in the CLI. Since I am using create-react-app (CRA), I have no way of changing the webpack config to ignore those messages, as there is no such option in CRA.

LearningProcesss commented 1 year ago

Hi, take a look to this seems that it caused by CRA itself.

rgembalik commented 1 year ago

@LearningProcesss Yup, I am already tracking the topic at CRA, but the thing is it was reported some time ago and is not looking to be fixed soon. The solutions are mainly to disable source maps entirely (which sucks for development), make some modifications to configs of react scripts after the installation, or simply enable source maps on the target packages.

The thing is that source maps in packages are still useful to keep for debugging purposes, so I'd still see this as an improvement to this package.

It's not a critical bug, so I'd understand if you'll not wish to add them ;)