Source Map Webpack 5 pointing to a wrong file

Hi Everyone,

I’ve got some issues with webpack sourcemap. The issue is very similar to this one (Source Map & Webpack file path issues) which is also filed here but upon looking on the thread, the issue has still no resolution.

To have a brief explanation with this issue, the css properties which is originally being inputted from a specific file is appearing to be on the next file base on its base code structure. This is what I notice when doing some test here in my end.

So for example when you have a scss files of header.scss followed by nav.scss. And when you’re adding some css on header.scss. When you compile it and check on the browser, the css that you have place on header.scss is being detected on nav.scss and when you click on the source map, it doesn’t make sense because the css is really not there.

Hope someone else also encounter the same issue and have some solution and explanation on this. Tried looking this over the internet but the only thread I have find is the one I have attached above.

Thank you

Howdy! Which version of Sage are you using?

Opps, I am not sure if I have set the correct tag since I am not also sure with the sage you’re referring to, but I am using “webpack”: “^5.50.0”. Kindly correct me if I have some misleading tags and how do I correct it with my question. I am just a newbie here :slight_smile:

@johnsemblante This forum is for discussion for Roots tools and not for generic webpack questions, I’d suggest posting on Stack Overflow

1 Like

Apology here and thank you

No apology needed! This forum ranks high for some webpack and sourcemap queries on SERPs

If you’re ever doing WordPress work feel free to take a look at our stuff :smiley:

This topic was automatically closed after 42 days. New replies are no longer allowed.