Skip to content

Fix: inline package version (not shipping whole package.json in the bundle) #1323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomchen
Copy link

@tomchen tomchen commented Mar 1, 2025

Using parcel's inlineEnvironment parcel-bundler/parcel#8470 (comment) to inline the version so the whole package.json content is not included in the bundle

Must use "context": "browser" for targets.main and targets.module, default context "node" can't inline process.env.npm_package_version

Added @types/node for process's type definition

Closes #1322

Using parcel's `inlineEnvironment` parcel-bundler/parcel#8470 (comment) to inline the version so the whole package.json content is not included in the bundle

Must use `"context": "browser"` for targets.main and targets.module, default context "node" can't inline `process.env.npm_package_version`

Added @types/node for `process`'s type definition

Closes peers#1322
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The whole package.json content is shipped in the bundle
1 participant