Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SourceMaps not found with ngxLogger in Library #331

Open
ebottacin opened this issue Aug 21, 2023 · 1 comment
Open

SourceMaps not found with ngxLogger in Library #331

ebottacin opened this issue Aug 21, 2023 · 1 comment

Comments

@ebottacin
Copy link

In my application I have a library with ngxLogger.
In application testing with ng serve I have no issues. SourceMaps are decoded and in my logs
But when I compile the application and deploy to staging source maps are not decoded giving an unknown 0:0 location.

After some digging I've found that in method

getMapping(sourceMap, position)

the sourceMap object contains only one line but the location is pointing to line = 1

so the line

if (lineIndex === position.lineNumber) {

is always false. (lineIndex is always 0 and position.lineNumber is equal to 1)

During development ngServe built only one file (vendor.js) with several line (the line zero of the mapping is blank) so in this case the method can find the correct liine.

Can you fix the issue ?

@halindrome
Copy link

I am also running into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants