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

Setting up Tslog in webpack #223

Open
franjom opened this issue Mar 8, 2023 · 1 comment
Open

Setting up Tslog in webpack #223

franjom opened this issue Mar 8, 2023 · 1 comment

Comments

@franjom
Copy link

franjom commented Mar 8, 2023

Can someone please help me set tslog in webpack?
I set in my webpack.config inline source maps like this:
image

and in my tsconfig:
image

but all of my logs are undefined...
output is nothing like it's supposed to be:

image

Any advice is appreciated.
Thanks in advance

@dever23b
Copy link

dever23b commented Jun 14, 2023

Not sure if this is helpful, but posting here just in case. I'm having a similar issue and, while I haven't figured it out yet, I came across this issue while researching. I'm also experiencing empty stack traces. From what I've gathered so far, TSLog doesn't seem to be able to handle file paths containing parentheses. Since it doesn't expect them, when it encounters them, it discards the data from the trace.

My project uses NextJS; the Webpack bundle produced includes paths containing parentheses (example trace line: (webpack-internal:///(sc_server)/./src/server/services/auth.service.ts:36:26)). This code seems to be the culprit. The regex causes fulllFilePath to be incomplete, and the following logic eventually discards the line. As a result, all of my browser code ends up with blank traces.

I don't have a workaround figured out yet, but hopefully this might spark an idea from someone else.

Edit: Created an issue #240 for my findings specifically

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