Skip to content

Build New Platform Plugins #53532

@spalger

Description

@spalger

In order to get closer to only building plugins when running from source we need a tool to build new platform plugins that is totally decoupled from the legacy optimizer, and establishes conventions we want to reuse in the updated developer toolchain @tylersmalley is working on.

My plan is to build a package that just runs a number of webpack compilers and integrates into the existing CLI. Once everything has been migrated to the new platform this tool should be able to build all the front-end assets we need and we should be able to just delete the optimizer.

Planned features:

  • support single build and watch modes
  • use a webpack config that is as simple as possible
    • sass support
    • no less support
    • minification support
    • automatically setup global externals for React, moment, etc.
    • automatically write default export to window.__kbnBundles__['plugin/${pluginId}']
  • produce static assets that the will be loaded by the front-end and shipped with the distributable
  • run webpack compilers in separate processes (optionally grouped for machines with fewer CPU cores)
  • pause asset requests while builds are running

Related to #42699
Related to #36186
Related to #43290
Related to #53555

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions