Skip to content

File/Line numbers? #21

@sam-lex

Description

@sam-lex

Currently the line numbers are lost: showing as index.js which points to where the console.log is being called
screen shot 2017-09-16 at 3 16 58 pm

This picture shows as vendor.bundle.js because I had --sourcemap=false on.

I did managed to get it to show the "correct" file/line like so:
screen shot 2017-09-16 at 3 32 55 pm

But with a major downside, and that is having to make the call with extra ().

// before
this.logger.trace('Hi there');
// after
this.logger.trace('Hi there')();
// changes
this.logger.trace('Hi there') // returns a "formatted console.log function"
// so executing right after would result into showing the right file/line number

To avoid breaking the api, we could set a flag to make it either log directly or return a function.
I can't think of a "pretty" way of doing this though. Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions