Skip to content

Preserve the export statements of specific modules #2327

Open
@ChadKillingsworth

Description

@ChadKillingsworth

Need a way to indicate specific modules which will have their export statements preserved through compilation. This will allow the compiler to both process modules and also output modules.

Supports google/closure-compiler-npm#56

I'm envisioning that module rewriting will look something like this:

module$a = function() {};
module$a.foo = 'foo';

// Synthentic extern to be replaced with a module export statement
// before code printing
JSCompiler_preserveExport(module$a);
JSCompiler_preserveExport(JSCompiler_renameProperty('foo', module$a), module$a.foo);

Metadata

Metadata

Labels

Modulesenhancementinternal-issue-createdAn internal Google issue has been created to track this GitHub issuetriage-doneHas been reviewed by someone on triage rotation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions