TL;DR: We need some conventions/patterns/whatever around shared client and server code
As both users and Elastic continue to build out more plugins, we're inevitably going to need to share code between the client and the server, so we'll want to start creating isomorphic modules. We already have Webpack in the build process, so this is possible today (and even appears to be happing already with utils/fromRoot).
Going forward, we'll want to take both new code and existing frontend code and make it isomorphic, such that we can use it on both. Before we get too deep, we should figure out some conventions for doing this. Some things to consider:
- Where should the modules live?
- How should we test isomorphic modules?
TL;DR: We need some conventions/patterns/whatever around shared client and server code
As both users and Elastic continue to build out more plugins, we're inevitably going to need to share code between the client and the server, so we'll want to start creating isomorphic modules. We already have Webpack in the build process, so this is possible today (and even appears to be happing already with
utils/fromRoot).Going forward, we'll want to take both new code and existing frontend code and make it isomorphic, such that we can use it on both. Before we get too deep, we should figure out some conventions for doing this. Some things to consider: