Skip to content

generatedScopeName does not match the one from webpack #103

Open

Description

@leabaertschi

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.

Activity

  1. clarketm commented on Oct 26, 2017

    @clarketm

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions