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

[Question] Does render/Sync() support option for source maps URL as 'relative'? #1437

Closed
jordwms opened this issue Aug 11, 2021 · 1 comment

Comments

@jordwms
Copy link

jordwms commented Aug 11, 2021

I am troubleshooting a runtime issue with absolute paths in the compiled source map. When running from the CLI, dart-sass compiles source maps with relative paths, as expected. However, when running in JS using sass.render() or sass.renderSync() the source maps are generated with absolute paths. This is problematic as the generated source maps' URLs point to where they are found on my local storage rather than where a user can access them from relative web directory.

I have been unable to determine any options I can pass to these functions to generate relative source map URLs. Is there something I am missing?

@jathak
Copy link
Member

jathak commented Aug 18, 2021

Unfortunately, this isn't supported. You can JSON.parse(result.map) and modify its URL if you need it to be portable.

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