|
@rauchg | |||||
|
We are *very* far away from what a smart compiler can do when pre-rendering and server-rendering. A Next.js page like so:
export default () => <p>hi</hi>
should yield `<!doctype html><p>hi</p>` and not a single extra byte
If you are interested in this type of challenge DM me!
|
||||||
|
||||||
|
Kevin Marks
@kevinmarks
|
16. ruj 2018. |
|
Why the </p>?
|
||
|
|
||
|
Guillermo Rauch
@rauchg
|
16. ruj 2018. |
|
🤯 Forgot about the html5 rules about that. Great observation!
|
||
|
|
||
|
Guillermo Rauch
@rauchg
|
16. ruj 2018. |
|
Because the idea is to smartly support the full spectrum of static and dynamic components, including only the portions of the runtime that are necessary.
The example above underlines that no runtime is included when nothing is dynamic
|
||
|
|
||
|
Eli White
@Eli_White
|
16. ruj 2018. |
|
Sounds like Prepack!
|
||
|
|
||
|
Guillermo Rauch
@rauchg
|
16. ruj 2018. |
|
Hopefully it is exactly prepack :)
|
||
|
|
||
|
Guillermo Rauch
@rauchg
|
16. ruj 2018. |
|
lol
|
||
|
|
||
|
Truong Hoang Dung
@revskill
|
16. ruj 2018. |
|
Why not turning from <p>hi</p> into a js file: export default () => <p>hi</hi> ;)
|
||
|
|
||
|
Guillermo Rauch
@rauchg
|
16. ruj 2018. |
|
need an edit button
|
||
|
|
||