Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a user I would like an API for syncing client / server index.html #1

Open
thescientist13 opened this issue Sep 5, 2018 · 0 comments
Labels
enhancement New feature or request example good first issue Good for newcomers
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Sep 5, 2018

Currently the HTML for the SSR app's index.html is hardcoded in server.js.

<body>
    <div id="app">${html}</div>
    <script>
    // WARNING: See the following for security issues around embedding JSON in HTML:
    // http://redux.js.org/docs/recipes/ServerRendering.html#security-considerations
    window.__PRELOADED_STATE__ = ${JSON.stringify(preloadedState).replace(/</g, '\\u003c')}
    </script>
    <script src="/static/bundle.js"></script>
</body>

It would be nice if the index.html from webpack's build output in dist/ could be reused here so as to avoid duplication. This would also help resolve #2 .

@thescientist13 thescientist13 added the enhancement New feature or request label Sep 5, 2018
@thescientist13 thescientist13 added this to the POC milestone Sep 5, 2018
@thescientist13 thescientist13 self-assigned this Sep 5, 2018
@thescientist13 thescientist13 changed the title API for syncing client / server HTML (mounting point) As a user I would like an API for syncing client / server HTML (root mounting point) Sep 5, 2018
@thescientist13 thescientist13 added API and removed API labels Sep 5, 2018
@thescientist13 thescientist13 removed this from the POC milestone Sep 9, 2018
@thescientist13 thescientist13 changed the title As a user I would like an API for syncing client / server HTML (root mounting point) As a user I would like an API for syncing client / server index.html Sep 9, 2018
@thescientist13 thescientist13 added this to the MVP milestone Sep 9, 2018
@thescientist13 thescientist13 added the good first issue Good for newcomers label Sep 9, 2018
@thescientist13 thescientist13 removed their assignment Sep 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request example good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant