We're currently building the Kibana platform plugins from the builds rootPath. The issue is builds only have production dependencies. In order to prevent shipping dependencies used only in client-side code, we will need to be able to move them to devDependencies to accomplish this.
One thing to consider here, is that doing this does not ensure we have a "clean" node_modules. Providing a notice during the build might be enough here since this is not an issue on CI or release manager.