Skip to content
New issue

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

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

Already on GitHub? # to your account

Server Hot Reload and SSR #2

Open
zhenyulin opened this issue Aug 18, 2017 · 1 comment
Open

Server Hot Reload and SSR #2

zhenyulin opened this issue Aug 18, 2017 · 1 comment

Comments

@zhenyulin
Copy link

zhenyulin commented Aug 18, 2017

I just started to move to typescript, and found this boilerplate to be very nice and similar to what I've been using previously with flow previously

During the process of set it up, I also find some features can be further added, e.g. Server-side Hot Reload, and SSR, would be happy to make contribution here, but would be great to have some initial direction.

Currently, it seems I'm not able to use ES6 module import on the server side yet. While tslint-loader is set up on the client side webpack config, the server file is also hooked on it in some way. Would be great to have an idea of how this part is structured.

Furthermore, the client side code seems to be built twice when start the server in development, once by the build command, and another time by the 'webpack-dev-middleware'.

@hirako2000
Copy link
Contributor

@zhenyulin thanks for your comments, and sure you are welcome to contribute.

A few reasons first to explain the lack of support of the tech you mentioned:

  • Server side hot reload
    Since webGL content is pretty much all on the front end, there is little need to support hot reload on the server code as there is almost nothing in there. If the boilerplate evolved into full fledged server resources, such as supporting sockets to fetch data from the server etc, then yes it would make total sense (I doubt this boilerplate should bloat itself with too much).

  • SSR (assuming you refer to server side rendering)
    Same deal, the server templating and rendering html content is a very efficient approach to boost performance for first paint/interaction, however, since webGL assets are usually very heavy weight, it would provide very little benefit in this use case.

  • ES6 module import on the server
    Probably an oversight on my part, and didn't pay attention since there is little to nothing on the server, would be good simply add it.

  • Build twice?
    Seems like a bug. yes we should fix that.

thanks-

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants