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

generatedScopeName does not match the one from webpack #103

Open
leabaertschi opened this issue Sep 18, 2017 · 1 comment · May be fixed by #114
Open

generatedScopeName does not match the one from webpack #103

leabaertschi opened this issue Sep 18, 2017 · 1 comment · May be fixed by #114

Comments

@leabaertschi
Copy link

leabaertschi commented Sep 18, 2017

Hi,
I'm using webpack@^3.5.5, css-loader@^0.28.7 and css-modules-require-hook@^4.2.2.

My hook looks as follows:

hook({
	extensions: ['.less'],
	preprocessCss: function(css, filename) {
		return parseLess(css, filename);
	},
	generateScopedName: '[local]-[hash:base64:5]',
	rootDir: path.resolve(__dirname, '../../../../../')
});

rootDir matches the context of webpack and of css-loader, but the generated hashes do not match.
I'm a bit lost, so let me know what more information I can provide that might help to solve this.

@clarketm
Copy link

clarketm commented Oct 26, 2017

@leahaense – I would either double-check your rootDir path or try a relative path. I was experiencing this same issue. Ultimately the problem was rooted in an incorrect path for rootDir; simply adjusting it to a relative path from cmrh.conf.js to the webpack context was my resolution.

@a-x- a-x- linked a pull request Feb 27, 2018 that will close this issue
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.

2 participants