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

Match webpack sourcemap relative paths #1219

Merged
merged 2 commits into from
Nov 4, 2020

Conversation

isaacl
Copy link
Contributor

@isaacl isaacl commented Nov 3, 2020

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Adjust source path to match the way webpack generates sourcemaps
for js. This makes css and js sources appear in the same directory
when using sourcemaps in chrome.

Fixes #1218.

Breaking Changes

Additional Info

@jsf-clabot
Copy link

jsf-clabot commented Nov 3, 2020

CLA assistant check
All committers have signed the CLA.

@isaacl
Copy link
Contributor Author

isaacl commented Nov 3, 2020

@evilebottnawi thanks for the tip

@alexander-akait
Copy link
Member

Yep, easy to fix, update snapshot too

@isaacl isaacl force-pushed the fixWebpackPaths branch 3 times, most recently from c8e9859 to 2a41281 Compare November 4, 2020 11:56
Adjust source path to match the way webpack generates sourcemaps
for js. This makes css and js sources appear in the same directory
when using sourcemaps in chrome.

Fixes webpack-contrib#1218.
@isaacl
Copy link
Contributor Author

isaacl commented Nov 4, 2020

Is it not loading my snapshot changes?

@alexander-akait
Copy link
Member

Give me minute on fixing tests

@alexander-akait
Copy link
Member

Let's merge as is and I will fix tests in other PR, want to fix it ASAP

@alexander-akait alexander-akait merged commit 3229b3c into webpack-contrib:master Nov 4, 2020
@isaacl
Copy link
Contributor Author

isaacl commented Nov 4, 2020

I'm really confused by why the tests are failing, it seems like linux is getting a different contenthash than on my mac

@isaacl
Copy link
Contributor Author

isaacl commented Nov 4, 2020

but previously they were both getting the same hash

@alexander-akait
Copy link
Member

alexander-akait commented Nov 4, 2020

hash is other because we change sources, so link on source maps changed also, so hash different, don't worry, all is fine

isaacl added a commit to isaacl/css-loader that referenced this pull request Nov 4, 2020
@isaacl isaacl mentioned this pull request Nov 4, 2020
6 tasks
@isaacl
Copy link
Contributor Author

isaacl commented Nov 4, 2020

I tried in #1221 but it still fails idk

This was referenced Mar 16, 2021
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.

Sourcemaps from webpack & mini-css-extract-plugin have slightly different directory structure
4 participants