Skip to content

Minify unbundled files with Terser #4

@DrewML

Description

@DrewML

Requirements

  1. For each theme that is processed, all deployed .js files that are not in core-bundle.js should be minified through terser
  2. Minified files should be written in-place (same file name) to avoid the need for any path rewriting at build or runtime.
  3. Minification should happen in worker threads, to speed up compilation time and avoid blocking the main thread's bundling work

Pieces

  • For worker-based minification, there's already the createMinifier module that will create a pool of minification workers. We'll want to add a minifyFromFile API, though, so we don't need to read loose files into memory in the main process and then serialize/transfer/parse in the worker

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions