ampproject / ampproject/rollup-plugin-closure-compiler
imported object keys are mangled differently between chunks
- Dominant language
- TypeScript
- Stars
- 293
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
## What's the issue?
Followup from https://twitter.com/kristoferbaxter/status/1215787614239772672, where @kristoferbaxter said:
> Got it building successfully, but imported object keys are mangled differently between chunks.
>
> Believe this is due to not auto-generating the import extern with the correct structure (which requires creating them during the `transform` hook).
>
> Likely to take awhile to fix.
## How do we reproduce the issue?
```
git clone https://github.com/filipesilva/rollup-closure-cli
cd rollup-closure-cli
yarn
yarn rollup-closure
yarn e2e-rollup-closure
```
The missing keys will cause an error at runtime.
## Additional context
Contributor guide
Research direction
Clone filipesilva/rollup-closure-cli, install its dependencies, and run yarn rollup-closure followed by yarn e2e-rollup-closure to reproduce the runtime error from missing keys. Investigate how imported object externs are generated during the transform hook and verify that mangled keys remain consistent across chunks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, rollup, typescript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100