Comments (7)
can you include the repo? It's hard to identify the problem just from the file you included here, it can be from outside _document.js
.
Make sure to:
- Remove
tsconfig.json
or renametsconfig.json
tojsconfig.json
- If you use jsconfig.json and use absolute import, make sure it's configured properly
- Any underlying components, utilities, etc are converted to js
But if I may ask, why do you transform it to normal js?
from nextarter-chakra.
Anyways, I was able to transform this template to js with slight modifications, you can see what I do at this branch:
https://github.com/sozonome/nextarter-chakra/tree/transform/js
changes: 035ce54
Hope this helps
from nextarter-chakra.
Thanks a lot. It's late over here so I will work on this tomorrow. Much appreciated !
from nextarter-chakra.
Thanks a lot. It's late over here so I will work on this tomorrow. Much appreciated !
No worries, happy to help 🙏 . Let me know if its resolved and I will close this issue.
from nextarter-chakra.
@sozonome I copied your code and is working perfectly. Thanks a lot for taking time and looking into this 🙏.
I would like to understand more what is happening here in _document.js
with this caching. Is there a resource where I could learn what is happening here inside _document.js
and especially for what reason?
Thanks,
Primoz
from nextarter-chakra.
@sozonome I copied your code and is working perfectly. Thanks a lot for taking time and looking into this 🙏.
I would like to understand more what is happening here in
_document.js
with this caching. Is there a resource where I could learn what is happening here inside_document.js
and especially for what reason?Thanks,
Primoz
It initally caused by flash of unstyled content issue (FOUC). But I think the current next.js / chakra-ui version already tackle it (either through experimental flag or else, I'll look onto it again, maybe I will remove this _document and emotion cache workaround if its not needed anymore).
References:
- https://griko.id/blog/prevent-fouc-on-next-js-chakra-ui
- https://github.com/mui-org/material-ui/blob/master/examples/nextjs-with-typescript/pages/_document.tsx
from nextarter-chakra.
@sozonome understood! I will be keeping my eye on the update.
from nextarter-chakra.
Related Issues (8)
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 nextarter-chakra.