Create React App
Install the package:
npm install classy-ui@beta
Start using it:
import { compose, tokens } from 'classy-ui/macro';
Note that we are importing from classy-ui/macro, not from classy-ui
Create React App uses a build directory to output the bundle, which is where Classy-UI outputs its build by default as well.
The only thing you need to do is to include this classy-ui.css file in your HTML file.
<!DOCTYPE html>
<html>
<head>
<% if (process.env.NODE_ENV === 'production'){ %>
<link rel="stylesheet" href="%PUBLIC_URL%/classy-ui.css" />
<% } %>
</head>
<body>
...
</body>
</html>
Classy-UI does not currently support hashing. The reason being that the Babel plugin is not able to pass information about the name to the build tool. We are exploring this and any feedback is welcome. That means you should ensure that the classy-ui.css file is using ETag.
Last modified 3yr ago