Skip to content

Conversation

@kamilogorek
Copy link
Contributor

This makes some configurations of Webpack, which emit "sourceRoot": "webpack:///" work as expected, and allowing CLI to rewrite sources into webpack:///./src/foo/bar.js rather than webpack:/./src/foo/bar.js.

@kamilogorek kamilogorek requested a review from Swatinem March 6, 2023 13:42
@kamilogorek kamilogorek enabled auto-merge (squash) March 6, 2023 13:46
@kamilogorek kamilogorek requested a review from loewenheim March 6, 2023 14:05
Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

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

a couple nits

Comment on lines +192 to +193
let source_root = if source_root.ends_with('/') {
source_root[..source_root.len() - 1].to_string()
Copy link
Member

Choose a reason for hiding this comment

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

I believe you can use strip_suffix() here


#[test]
fn test_basic_sourcemap_with_absolute_uri_root() {
let input: &[_] = b"{
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
let input: &[_] = b"{
let input: &[_] = rb#"{

so you won’t have to escape everything

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

Successfully merging this pull request may close these issues.

3 participants