Comments (3)
Additionally, having some kind of automatic hydration check every time we run a build would be nice, not sure if Gridsome supports that.
from ocfstatic.
I haven't had too much time to debug what exactly happens, but HTML <!-- -->
comments do get stripped out of the final build (at least for SSR). Also, from a cursory glance at the ASTs produced by the eslint parser, detecting the location of a comment is quite annoying since they are at the root of the <template>
and not the node they're contained in. Flat-out banning HTML comments would be easier, but we need to check that JS comments don't break it either.
A hydration test seems quite computationally expensive because AFAICT most of the issue comes from how the browser parsers the HTML, so you'd need a real browser and not e.g. JSDOM; plus, we'd need to check that every page hydrates correctly and have a way of reliably detecting when hydration failed (probably just clicking buttons?).
from ocfstatic.
Oh ok that's good to know about HTML comments. I just tested it and hydration worked fine for me with JS comments.
As for the hydration test, I didn't really take that into account, it definitely seems like something that would require a lot more fine tuning to get right. Maybe an easy solution for now is to just implement a HTML validation step in our build process? That would identify all the missing closing tag issues that people were mentioning in the Gridsome issues.
from ocfstatic.
Related Issues (20)
- Streamline the homepage HOT 1
- Streamline the Homepage
- Use React HOT 8
- Another hydration issue on aboutpage HOT 1
- this.hours sometimes isn't updated
- Add photos on Officers page
- Decide what to do with all those add to staff PRs HOT 11
- Refactor Gridsome Out HOT 2
- Hide create account button on homepage when user is signed in
- Change Password Form Color/Messages
- Link to lab hours page from home page HOT 1
- Fix accessibility issues
- Add legacy URL redirects HOT 3
- Extract docs to their own repo HOT 7
- Menu bar is not aria compliant HOT 2
- Staff Hours Calendar
- About Page HOT 4
- Fix Broken Links on Homepage HOT 1
- Fix Docs Homepage
- Discussion: Announcements HOT 2
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 ocfstatic.