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

feat: beautify the source maps #7394

Closed
wants to merge 7 commits into from
Closed

feat: beautify the source maps #7394

wants to merge 7 commits into from

Conversation

smallp
Copy link

@smallp smallp commented Mar 21, 2022

Description

Beautify the source maps. Move all source maps to source-maps:// namespace.

Additional context

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

#2950

@bluwy bluwy added the p2-nice-to-have Not breaking anything but nice to have (priority) label Mar 21, 2022
Copy link
Author

@smallp smallp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. And the tests may be incorrect.

@sapphi-red
Copy link
Member

Here sources are normalized.
For windows, C:/path/to/repo/packages/temp/css-sourcemap/foo.css becomes /root/foo.css.
For linux, /home/user/path/to/repo/packages/temp/css-sourcemap/foo.css becomes /root/foo.css.

m.sources = m.sources.map((source) => source.replace(root, '/root'))

@smallp
Copy link
Author

smallp commented Mar 28, 2022

Here sources are normalized. For windows, C:/path/to/repo/packages/temp/css-sourcemap/foo.css becomes /root/foo.css. For linux, /home/user/path/to/repo/packages/temp/css-sourcemap/foo.css becomes /root/foo.css.

m.sources = m.sources.map((source) => source.replace(root, '/root'))

Yes, I know that. But you can see that test, it cannot be deal correctly.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants