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

Configure the generated ident #156

Open
Tom910 opened this issue Apr 29, 2018 · 2 comments
Open

Configure the generated ident #156

Tom910 opened this issue Apr 29, 2018 · 2 comments

Comments

@Tom910
Copy link

Tom910 commented Apr 29, 2018

How it's work in css-loader https://github.com/webpack-contrib/css-loader localIdentName: '${moduleId}[hash:base64:3][name]'

My problem - on page have multi modules with differnt time build. Just indent like A, B will be repead and will be conflict

@amiller-gh
Copy link
Contributor

CSS Blocks will generate globally unique class names for your entire application, so with a typical app build you should run in to repeated identifiers.

However, you're right! If you're mixing assets from different build pipelines you could run into a problem here. Luckily, all the identifier rewriting happens in OptiCSS, and we do have some [configuration options for ident generation] (https://github.com/linkedin/opticss/blob/master/docs/ARCHITECTURE.md#identifier-rewriting).

However, we do have more ident generation features to add: linkedin/opticss#18

It sounds like you'd like the concept of an ident "namespace" or prefix to help in these use cases. Lets open the issue up in the OptiCSS repo and move discussion there – when the feature is added there it will also be made available to CSS Blocks proper through the optimization config passed through to OptiCSS 🙂

@milandimun
Copy link

@Tom910 is it still open? I could work on this.

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

No branches or pull requests

3 participants