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

Sourcemap generated on windows includes \\ for paths. Should be / #188

Closed
matthiasg opened this issue Jun 19, 2020 · 2 comments
Closed

Sourcemap generated on windows includes \\ for paths. Should be / #188

matthiasg opened this issue Jun 19, 2020 · 2 comments

Comments

@matthiasg
Copy link

In order for Chrome to resolve sourcemaps correctly (especially when using workspaces) the sources property in the sourcemap should specify forward slashes not escaped backward slashes.

E.g.

"sources": ["node_modules\\test\\src\\test2.js", "node_modules\\test\\src\\index.js", "src\\test\\index.ts", "src\\index.ts"]

should be

 "sources": ["node_modules/test/src/test2.js", "node_modules/test/src/index.js", "src/test/index.ts", "src/index.ts"]
@evanw
Copy link
Owner

evanw commented Jun 19, 2020

Thanks for reporting. I'm guessing this is because these are really URLs, not paths, and should be treated as such. It's also not great that esbuild's output is different depending on the platform it's running on even independent of this issue. I'll fix this sometime soon.

@matthiasg
Copy link
Author

Thanks. Great ! we always build on windows, linux, and mac to ensure consistency.

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