Skip to content

Remove $build$src from variable names in compressed chunks #7551

@cpcallen

Description

@cpcallen

Check for duplicates

  • I have searched for similar issues before opening a new one.

Problem

In commit 06d78af of PR #7473 I made a change that reduced the size of the compressed chunks by shortening the lengths of the generated variable names by shortening the pathnames fed to Closure Compiler.

Unfortunately this broke sourcemaps because it caused the gulp-sourcemaps plugin to omit the inline source from the generated <chunk>_compressed.js.map files, so the change was rolled back in pr #7550.

It should be possible to shorten the file paths fed to Closure Compiler, and thus the size of the compressed chunks, without breaking sourcemaps, but there was insufficient time to finish investigating how.

Request

Update the buildCompiled gulp task (npm run minify) to shorten the filenames fed to Closure Compiler—without breaking sourcemaps.

Alternatives considered

This might be obsoleted by implementing #5795 instead.

Additional context

DEBUG='gulp-sourcemaps:*' npm run minify will run the task with debugging enabled for the sourcemaps package, which looks like it should make this task much easier.

Metadata

Metadata

Assignees

Labels

internalExternal contributions not acceptedissue: bugDescribes why the code or behaviour is wrongtype: cleanup

Type

No type
No fields configured for issues without a type.

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions