olebedev / go-starter-kit

[abandoned] Golang isomorphic react/hot reloadable/redux/css-modules/SSR starter kit
Other
2.82k stars 357 forks source link

support for code splitting #69

Closed fanky5g closed 7 years ago

fanky5g commented 7 years ago

Been trying too hard to achieve code splitting but can't get my way around the window undefined error when rendering on the server.

Is there any way to achieve code splitting using webpack's require.ensure. or probably another method to circumvent that error.

olebedev commented 7 years ago

Obviously, server cannot handle source script loading via script html tag. Use different bundles for client and server.

fanky5g commented 7 years ago

I'll try to hack that, however if you could show an example to point me in the right direction I'd be grateful.