Description
Cannot build with Closure Compiler, even in ADVANCED mode with use_types_for_optimization, due to JSCompiler_renameProperty and trustedTypes
Live Demo
See repro here
Steps to Reproduce
- Set up an environment with
lit-element via npm or yarn (in my case, yarn from bazel)
- Write a little sample element that imports
lit-element and uses it
- Compile it with Closure Compiler in
ADVANCED mode, with use_types_for_optimization set to true
Expected Results
Built bundle, with JSCompiler_renameProperty being treated as a special compiler primitive
Actual Results
Instead, it is treated like a regular variable name, which is missing from the compilation unit, yielding a JSC_UNDEFINED_VARIABLE error
Browsers Affected
N/A (Build tooling)
Versions
- lit-element:
v2.4.0 via NPM
- webcomponents: N/A