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

Sourcemaps from webpack & mini-css-extract-plugin have slightly different directory structure #1218

Closed
webpack-bot opened this issue Nov 3, 2020 · 0 comments · Fixed by #1219

Comments

@webpack-bot
Copy link

Bug report

What is the current behavior?
In webpack 5 w/ mini-css-extract-plugin and config devtool: 'source-map', chrome groups css and js in different directories:
image

Here's the relevant snippet from the sourceMap files:
main.17fbf8.css.map: "sources":["webpack://main/src/main.scss"]
main.9c5261.js.map: "sources":["webpack://main/./src/main.js"...

full webpack config

It's annoying to have my files show separately in chrome, but I don't know which directory structure is more 'correct'. So, potentially, this is an issue for mini-css-extract-plugin.

Other relevant information:
webpack version: 5.3.2
Node.js version: v14.13.1
Operating System: OS X 10.15.7


This issue was moved from webpack/webpack#11910 by @evilebottnawi. Original issue was by @isaacl.

isaacl added a commit to isaacl/css-loader that referenced this issue Nov 3, 2020
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 added a commit to isaacl/css-loader that referenced this issue Nov 3, 2020
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 added a commit to isaacl/css-loader that referenced this issue Nov 3, 2020
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 added a commit to isaacl/css-loader that referenced this issue Nov 4, 2020
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 added a commit to isaacl/css-loader that referenced this issue Nov 4, 2020
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.
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 a pull request may close this issue.

1 participant