question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect path names being passed to CSS loader.

See original GitHub issue

After upgrading from 4.1.1 to 5.0.0, I noticed that the CSS loader, with modules enabled, was generating colliding hashes for different components in my application. I did a little poking around and discovered that the paths being passed to the loader are not accurate: when my localIdentName is set to [path][name]__[local]--[hash:base64], I see Webpack pulling in CSS from multiple files (e.g., app/components/logo-header/styles.scss and app/components/input/styles.scss, both of which define a class .root) but giving them the same identifier (e.g., .app-components-logo-header-styles__root--TqfiOWwF9tjvyCbNgxKoY, where one should have that identifier and the other should have .app-components-input-styles__root with a unique hash).

I’m working on putting together a minimum working example reproducing the bug, but I’d be grateful for any thoughts you had in the meantime. Thanks in advance for your help, and thanks for all your hard work on this repo!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jhnnscommented, Feb 8, 2017

A fix should ship with 5.0.1

1reaction
jhnnscommented, Feb 8, 2017

Thx, I’ll take a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack style-loader / css-loader: url() path resolution not ...
My problem was that all the url() rules (including fonts and images) were being loaded by css-loader as [object Module], and they where ......
Read more >
Resolve | webpack
An object is passed to the function with path and request properties. It must return a boolean. webpack.config.js module.exports = { //...
Read more >
API - esbuild
To join a set of files together with esbuild, import them all into a single entry point file and bundle just that one...
Read more >
css-loader - npm
If set to false , css-loader will not parse any paths specified in url or image-set . A function can also be passed...
Read more >
css-loader - webpack
file.js import css from 'file.css';. webpack.config.js ... Path to resolve URLs, URLs starting with / will not be translated. Name. url. Type. {Boolean}....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found