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

How to generate class names without hash ? #377

Closed
golubvladimir opened this issue Apr 30, 2019 · 1 comment
Closed

How to generate class names without hash ? #377

golubvladimir opened this issue Apr 30, 2019 · 1 comment

Comments

@golubvladimir
Copy link

In documentation:

const styles = StyleSheet.create({
  foo: {
    color: 'red'
  },

  bar: {
    color: 'blue'
  }
});

Generate:

.foo_im3wl1 {
  color: red;
}
.bar_hxfs3d {
  color: blue;
}

I want:

.foo {
  color: red;
}
.bar {
  color: blue;
}

How to do it ?

@jlfwong
Copy link
Collaborator

jlfwong commented Apr 30, 2019

Hi @golubvladimir,

There's intentionally no way to do this.

The hashes included in Aphrodite are fundamentally necessary for the design of Aphrodite to work correctly with server-side rendering and to avoid class name collisions between files.

So I think it's unlikely aphrodite will be updated with an option that allows the hashes to be removed entirely.

@jlfwong jlfwong closed this as completed Apr 30, 2019
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

2 participants