Comments (9)
Yes, it won't work with CRA. You should be able to get it to work with react-app-rewired, rescripts, craco, or react-scripts-rewired using the Webpack setup, although I haven't tried it.
from style9.
To use it with Next.js or Gatsby you would need to use a custom webpack config and then add the plugin as per the README. I have opened an issue about creating plugins, with would make this unnecessary.
CRA doesn't support plugins so you can't use this package with it.
Anything else I can improve about the documentation?
from style9.
Plugins would be an awesome solution.
Let me know when I can take a look at this again, cheers!
from style9.
Next.js & Gatsby plugins have now been added
from style9.
I just added Next plugin, and I also need to set the babel plugin (I don't know if it's expected), but it isn't clear to me how to use it. I was able to get the className, but style itself wasn't injected in the page. Am I missing something?
from style9.
No, you should not need to use the babel plugin. I created an example repo, style9-nextjs-example, that shows how to use it. If you look at the last commit it shows the necessary steps. Does that help?
from style9.
Really awesome, works like a charm!
from style9.
Great. If you are interested I also have an experimental babel macro that adds the styled-components API and support for inline styles.
from style9.
So if I want to use style9 with CRA, I need to eject it or customize webpack config, right?
from style9.
Related Issues (20)
- Generate readable class names in output HOT 1
- Incompatible with ejected create-react-app HOT 2
- Atomic css rule not works when component loaded as lazy HOT 7
- selector parse error HOT 1
- Compress class names HOT 2
- Incompatible with latest version of Next.js HOT 5
- Feature request: support nested selectors HOT 1
- Next.js hot-reload not working for new styles HOT 6
- Incompatible with Vite bundler HOT 8
- Using Next.js _document.js throws error on static export HOT 5
- Breaks with latest version of Next HOT 6
- Issue with webpack plugin on windows HOT 4
- [Feature Request] Transpile away `style9` runtime call HOT 5
- Support for advanced pseudos HOT 2
- Plugin does not work with next-contentlayer HOT 2
- Conflicts when used with Geist UI HOT 1
- Any plans to productionize a Vite plugin? HOT 1
- How to use global styles? HOT 1
- [Feature Request]: Support Vite
- Official support for CRA HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from style9.