Skip to content

Revisit Babel caching #1789

Closed
Closed
@novemberborn

Description

@novemberborn

Currently AVA resolves the Babel options itself. This gave us two benefits:

  • Much better analysis of plugin / preset dependencies, and thus more accurate cache usage decisions
  • Easier composition of AVA's built in Babel options and project configuration
  • The ability to generate a single JS module which provided a fully realized configuration object

Back then the plan was to compile on-the-fly inside worker processes. Not having to resolve the configuration in each worker would have given a performance boost. We haven't gotten round to doing this yet, and I suspect it'd be the wrong approach for compiling TypeScript files.

Babel 7 is making Babel configuration files much more powerful. It's hard to keep up with those changes, especially if we want to create a fully realized configuration object. #1788 is a necessary bug fix which further negates the attempted performance improvements if *.js configuration files are used.

It's time to revisit this approach:

Composing AVA's options may be the trickiest thing to achieve when using just Babel. Note that we have an outstanding bug there, too: #1732.

For now I propose we switch to use pure Babel and forgo the dependency analysis. We may have to make it easier to clear the cache, though.

@avajs/core thoughts?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions