google / google/closure-compiler
Don't add package.json content to the output
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
When compiling with `--module-resolution=NODE`, I must pass the `package.json` locations of imported modules as specified in the documentation. I then also pass using the `--js` flag the resolved `module` or `main` fields from the `package.json` which point to the actual dependencies in the program. Therefore, the content of `package.json` does not need to be present in the output bundle, but it is! There's no point of putting it in there when no code actually calls `import packageJson from 'dependency/package.json` you know. I.e., you're forcing me to add `package.json` in the flags but I don't want it in the bundle. I guess it's arguable that the advanced compilation would remove it but it's not the point the point is that there must be some kind of `--package-json flag` instead of `--js` for the cases when I want to compile JS with dependencies but not include the `package.json` content in the output.
Contributor guide
Assessment
This issue has not been assessed yet.